{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Extraindo informações do Bureau Balance: \n",
    "* https://www.kaggle.com/c/home-credit-default-risk/discussion/58445\n",
    "* https://www.kaggle.com/c/home-credit-default-risk/discussion/57750"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import data\n",
    "import charts\n",
    "import pickle\n",
    "import seaborn as sns\n",
    "\n",
    "pd.set_option('display.max_columns', 500)\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def find_missing(data):\n",
    "    # number of missing values\n",
    "    count_missing = data.isnull().sum().values\n",
    "    # total records\n",
    "    total = data.shape[0]\n",
    "    # percentage of missing\n",
    "    ratio_missing = count_missing / total\n",
    "    # return a dataframe to show: feature name, # of missing and % of missing\n",
    "    return pd.DataFrame(data={'missing_count':count_missing, 'missing_ratio':ratio_missing}, index=data.columns.values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>NAME_CONTRACT_TYPE</th>\n",
       "      <th>CODE_GENDER</th>\n",
       "      <th>FLAG_OWN_CAR</th>\n",
       "      <th>FLAG_OWN_REALTY</th>\n",
       "      <th>CNT_CHILDREN</th>\n",
       "      <th>AMT_INCOME_TOTAL</th>\n",
       "      <th>AMT_CREDIT</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>AMT_GOODS_PRICE</th>\n",
       "      <th>NAME_TYPE_SUITE</th>\n",
       "      <th>NAME_INCOME_TYPE</th>\n",
       "      <th>NAME_EDUCATION_TYPE</th>\n",
       "      <th>NAME_FAMILY_STATUS</th>\n",
       "      <th>NAME_HOUSING_TYPE</th>\n",
       "      <th>REGION_POPULATION_RELATIVE</th>\n",
       "      <th>DAYS_BIRTH</th>\n",
       "      <th>DAYS_EMPLOYED</th>\n",
       "      <th>DAYS_REGISTRATION</th>\n",
       "      <th>DAYS_ID_PUBLISH</th>\n",
       "      <th>OWN_CAR_AGE</th>\n",
       "      <th>FLAG_MOBIL</th>\n",
       "      <th>FLAG_EMP_PHONE</th>\n",
       "      <th>FLAG_WORK_PHONE</th>\n",
       "      <th>FLAG_CONT_MOBILE</th>\n",
       "      <th>FLAG_PHONE</th>\n",
       "      <th>FLAG_EMAIL</th>\n",
       "      <th>OCCUPATION_TYPE</th>\n",
       "      <th>CNT_FAM_MEMBERS</th>\n",
       "      <th>REGION_RATING_CLIENT</th>\n",
       "      <th>REGION_RATING_CLIENT_W_CITY</th>\n",
       "      <th>WEEKDAY_APPR_PROCESS_START</th>\n",
       "      <th>HOUR_APPR_PROCESS_START</th>\n",
       "      <th>REG_REGION_NOT_LIVE_REGION</th>\n",
       "      <th>REG_REGION_NOT_WORK_REGION</th>\n",
       "      <th>LIVE_REGION_NOT_WORK_REGION</th>\n",
       "      <th>REG_CITY_NOT_LIVE_CITY</th>\n",
       "      <th>REG_CITY_NOT_WORK_CITY</th>\n",
       "      <th>LIVE_CITY_NOT_WORK_CITY</th>\n",
       "      <th>ORGANIZATION_TYPE</th>\n",
       "      <th>EXT_SOURCE_1</th>\n",
       "      <th>EXT_SOURCE_2</th>\n",
       "      <th>EXT_SOURCE_3</th>\n",
       "      <th>APARTMENTS_AVG</th>\n",
       "      <th>BASEMENTAREA_AVG</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_AVG</th>\n",
       "      <th>YEARS_BUILD_AVG</th>\n",
       "      <th>COMMONAREA_AVG</th>\n",
       "      <th>ELEVATORS_AVG</th>\n",
       "      <th>ENTRANCES_AVG</th>\n",
       "      <th>FLOORSMAX_AVG</th>\n",
       "      <th>FLOORSMIN_AVG</th>\n",
       "      <th>LANDAREA_AVG</th>\n",
       "      <th>LIVINGAPARTMENTS_AVG</th>\n",
       "      <th>LIVINGAREA_AVG</th>\n",
       "      <th>NONLIVINGAPARTMENTS_AVG</th>\n",
       "      <th>NONLIVINGAREA_AVG</th>\n",
       "      <th>APARTMENTS_MODE</th>\n",
       "      <th>BASEMENTAREA_MODE</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MODE</th>\n",
       "      <th>YEARS_BUILD_MODE</th>\n",
       "      <th>COMMONAREA_MODE</th>\n",
       "      <th>ELEVATORS_MODE</th>\n",
       "      <th>ENTRANCES_MODE</th>\n",
       "      <th>FLOORSMAX_MODE</th>\n",
       "      <th>FLOORSMIN_MODE</th>\n",
       "      <th>LANDAREA_MODE</th>\n",
       "      <th>LIVINGAPARTMENTS_MODE</th>\n",
       "      <th>LIVINGAREA_MODE</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MODE</th>\n",
       "      <th>NONLIVINGAREA_MODE</th>\n",
       "      <th>APARTMENTS_MEDI</th>\n",
       "      <th>BASEMENTAREA_MEDI</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MEDI</th>\n",
       "      <th>YEARS_BUILD_MEDI</th>\n",
       "      <th>COMMONAREA_MEDI</th>\n",
       "      <th>ELEVATORS_MEDI</th>\n",
       "      <th>ENTRANCES_MEDI</th>\n",
       "      <th>FLOORSMAX_MEDI</th>\n",
       "      <th>FLOORSMIN_MEDI</th>\n",
       "      <th>LANDAREA_MEDI</th>\n",
       "      <th>LIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>LIVINGAREA_MEDI</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>NONLIVINGAREA_MEDI</th>\n",
       "      <th>FONDKAPREMONT_MODE</th>\n",
       "      <th>HOUSETYPE_MODE</th>\n",
       "      <th>TOTALAREA_MODE</th>\n",
       "      <th>WALLSMATERIAL_MODE</th>\n",
       "      <th>EMERGENCYSTATE_MODE</th>\n",
       "      <th>OBS_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>OBS_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DAYS_LAST_PHONE_CHANGE</th>\n",
       "      <th>FLAG_DOCUMENT_2</th>\n",
       "      <th>FLAG_DOCUMENT_3</th>\n",
       "      <th>FLAG_DOCUMENT_4</th>\n",
       "      <th>FLAG_DOCUMENT_5</th>\n",
       "      <th>FLAG_DOCUMENT_6</th>\n",
       "      <th>FLAG_DOCUMENT_7</th>\n",
       "      <th>FLAG_DOCUMENT_8</th>\n",
       "      <th>FLAG_DOCUMENT_9</th>\n",
       "      <th>FLAG_DOCUMENT_10</th>\n",
       "      <th>FLAG_DOCUMENT_11</th>\n",
       "      <th>FLAG_DOCUMENT_12</th>\n",
       "      <th>FLAG_DOCUMENT_13</th>\n",
       "      <th>FLAG_DOCUMENT_14</th>\n",
       "      <th>FLAG_DOCUMENT_15</th>\n",
       "      <th>FLAG_DOCUMENT_16</th>\n",
       "      <th>FLAG_DOCUMENT_17</th>\n",
       "      <th>FLAG_DOCUMENT_18</th>\n",
       "      <th>FLAG_DOCUMENT_19</th>\n",
       "      <th>FLAG_DOCUMENT_20</th>\n",
       "      <th>FLAG_DOCUMENT_21</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_HOUR</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_DAY</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_WEEK</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_MON</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_QRT</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_YEAR</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100002</td>\n",
       "      <td>1</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>202500.0</td>\n",
       "      <td>406597.5</td>\n",
       "      <td>24700.5</td>\n",
       "      <td>351000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.018801</td>\n",
       "      <td>-9461</td>\n",
       "      <td>-637</td>\n",
       "      <td>-3648.0</td>\n",
       "      <td>-2120</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>0.083037</td>\n",
       "      <td>0.262949</td>\n",
       "      <td>0.139376</td>\n",
       "      <td>0.0247</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6192</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.0202</td>\n",
       "      <td>0.0190</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0252</td>\n",
       "      <td>0.0383</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6341</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0377</td>\n",
       "      <td>0.022</td>\n",
       "      <td>0.0198</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6243</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0375</td>\n",
       "      <td>0.0205</td>\n",
       "      <td>0.0193</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0149</td>\n",
       "      <td>Stone, brick</td>\n",
       "      <td>No</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-1134.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100003</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>N</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>1293502.5</td>\n",
       "      <td>35698.5</td>\n",
       "      <td>1129500.0</td>\n",
       "      <td>Family</td>\n",
       "      <td>State servant</td>\n",
       "      <td>Higher education</td>\n",
       "      <td>Married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.003541</td>\n",
       "      <td>-16765</td>\n",
       "      <td>-1188</td>\n",
       "      <td>-1186.0</td>\n",
       "      <td>-291</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>School</td>\n",
       "      <td>0.311267</td>\n",
       "      <td>0.622246</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0959</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7960</td>\n",
       "      <td>0.0605</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0130</td>\n",
       "      <td>0.0773</td>\n",
       "      <td>0.0549</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0098</td>\n",
       "      <td>0.0924</td>\n",
       "      <td>0.0538</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.8040</td>\n",
       "      <td>0.0497</td>\n",
       "      <td>0.0806</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0128</td>\n",
       "      <td>0.079</td>\n",
       "      <td>0.0554</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0968</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7987</td>\n",
       "      <td>0.0608</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0132</td>\n",
       "      <td>0.0787</td>\n",
       "      <td>0.0558</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.01</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0714</td>\n",
       "      <td>Block</td>\n",
       "      <td>No</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-828.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100004</td>\n",
       "      <td>0</td>\n",
       "      <td>Revolving loans</td>\n",
       "      <td>M</td>\n",
       "      <td>Y</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>6750.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.010032</td>\n",
       "      <td>-19046</td>\n",
       "      <td>-225</td>\n",
       "      <td>-4260.0</td>\n",
       "      <td>-2531</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Government</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.555912</td>\n",
       "      <td>0.729567</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-815.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100006</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>312682.5</td>\n",
       "      <td>29686.5</td>\n",
       "      <td>297000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Civil marriage</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.008019</td>\n",
       "      <td>-19005</td>\n",
       "      <td>-3039</td>\n",
       "      <td>-9833.0</td>\n",
       "      <td>-2437</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.650442</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-617.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100007</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>121500.0</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>21865.5</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.028663</td>\n",
       "      <td>-19932</td>\n",
       "      <td>-3038</td>\n",
       "      <td>-4311.0</td>\n",
       "      <td>-3458</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>THURSDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Religion</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.322738</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1106.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  TARGET NAME_CONTRACT_TYPE CODE_GENDER FLAG_OWN_CAR  \\\n",
       "0      100002       1         Cash loans           M            N   \n",
       "1      100003       0         Cash loans           F            N   \n",
       "2      100004       0    Revolving loans           M            Y   \n",
       "3      100006       0         Cash loans           F            N   \n",
       "4      100007       0         Cash loans           M            N   \n",
       "\n",
       "  FLAG_OWN_REALTY  CNT_CHILDREN  AMT_INCOME_TOTAL  AMT_CREDIT  AMT_ANNUITY  \\\n",
       "0               Y             0          202500.0    406597.5      24700.5   \n",
       "1               N             0          270000.0   1293502.5      35698.5   \n",
       "2               Y             0           67500.0    135000.0       6750.0   \n",
       "3               Y             0          135000.0    312682.5      29686.5   \n",
       "4               Y             0          121500.0    513000.0      21865.5   \n",
       "\n",
       "   AMT_GOODS_PRICE NAME_TYPE_SUITE NAME_INCOME_TYPE  \\\n",
       "0         351000.0   Unaccompanied          Working   \n",
       "1        1129500.0          Family    State servant   \n",
       "2         135000.0   Unaccompanied          Working   \n",
       "3         297000.0   Unaccompanied          Working   \n",
       "4         513000.0   Unaccompanied          Working   \n",
       "\n",
       "             NAME_EDUCATION_TYPE    NAME_FAMILY_STATUS  NAME_HOUSING_TYPE  \\\n",
       "0  Secondary / secondary special  Single / not married  House / apartment   \n",
       "1               Higher education               Married  House / apartment   \n",
       "2  Secondary / secondary special  Single / not married  House / apartment   \n",
       "3  Secondary / secondary special        Civil marriage  House / apartment   \n",
       "4  Secondary / secondary special  Single / not married  House / apartment   \n",
       "\n",
       "   REGION_POPULATION_RELATIVE  DAYS_BIRTH  DAYS_EMPLOYED  DAYS_REGISTRATION  \\\n",
       "0                    0.018801       -9461           -637            -3648.0   \n",
       "1                    0.003541      -16765          -1188            -1186.0   \n",
       "2                    0.010032      -19046           -225            -4260.0   \n",
       "3                    0.008019      -19005          -3039            -9833.0   \n",
       "4                    0.028663      -19932          -3038            -4311.0   \n",
       "\n",
       "   DAYS_ID_PUBLISH  OWN_CAR_AGE  FLAG_MOBIL  FLAG_EMP_PHONE  FLAG_WORK_PHONE  \\\n",
       "0            -2120          NaN           1               1                0   \n",
       "1             -291          NaN           1               1                0   \n",
       "2            -2531         26.0           1               1                1   \n",
       "3            -2437          NaN           1               1                0   \n",
       "4            -3458          NaN           1               1                0   \n",
       "\n",
       "   FLAG_CONT_MOBILE  FLAG_PHONE  FLAG_EMAIL OCCUPATION_TYPE  CNT_FAM_MEMBERS  \\\n",
       "0                 1           1           0        Laborers              1.0   \n",
       "1                 1           1           0      Core staff              2.0   \n",
       "2                 1           1           0        Laborers              1.0   \n",
       "3                 1           0           0        Laborers              2.0   \n",
       "4                 1           0           0      Core staff              1.0   \n",
       "\n",
       "   REGION_RATING_CLIENT  REGION_RATING_CLIENT_W_CITY  \\\n",
       "0                     2                            2   \n",
       "1                     1                            1   \n",
       "2                     2                            2   \n",
       "3                     2                            2   \n",
       "4                     2                            2   \n",
       "\n",
       "  WEEKDAY_APPR_PROCESS_START  HOUR_APPR_PROCESS_START  \\\n",
       "0                  WEDNESDAY                       10   \n",
       "1                     MONDAY                       11   \n",
       "2                     MONDAY                        9   \n",
       "3                  WEDNESDAY                       17   \n",
       "4                   THURSDAY                       11   \n",
       "\n",
       "   REG_REGION_NOT_LIVE_REGION  REG_REGION_NOT_WORK_REGION  \\\n",
       "0                           0                           0   \n",
       "1                           0                           0   \n",
       "2                           0                           0   \n",
       "3                           0                           0   \n",
       "4                           0                           0   \n",
       "\n",
       "   LIVE_REGION_NOT_WORK_REGION  REG_CITY_NOT_LIVE_CITY  \\\n",
       "0                            0                       0   \n",
       "1                            0                       0   \n",
       "2                            0                       0   \n",
       "3                            0                       0   \n",
       "4                            0                       0   \n",
       "\n",
       "   REG_CITY_NOT_WORK_CITY  LIVE_CITY_NOT_WORK_CITY       ORGANIZATION_TYPE  \\\n",
       "0                       0                        0  Business Entity Type 3   \n",
       "1                       0                        0                  School   \n",
       "2                       0                        0              Government   \n",
       "3                       0                        0  Business Entity Type 3   \n",
       "4                       1                        1                Religion   \n",
       "\n",
       "   EXT_SOURCE_1  EXT_SOURCE_2  EXT_SOURCE_3  APARTMENTS_AVG  BASEMENTAREA_AVG  \\\n",
       "0      0.083037      0.262949      0.139376          0.0247            0.0369   \n",
       "1      0.311267      0.622246           NaN          0.0959            0.0529   \n",
       "2           NaN      0.555912      0.729567             NaN               NaN   \n",
       "3           NaN      0.650442           NaN             NaN               NaN   \n",
       "4           NaN      0.322738           NaN             NaN               NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_AVG  YEARS_BUILD_AVG  COMMONAREA_AVG  \\\n",
       "0                       0.9722           0.6192          0.0143   \n",
       "1                       0.9851           0.7960          0.0605   \n",
       "2                          NaN              NaN             NaN   \n",
       "3                          NaN              NaN             NaN   \n",
       "4                          NaN              NaN             NaN   \n",
       "\n",
       "   ELEVATORS_AVG  ENTRANCES_AVG  FLOORSMAX_AVG  FLOORSMIN_AVG  LANDAREA_AVG  \\\n",
       "0           0.00         0.0690         0.0833         0.1250        0.0369   \n",
       "1           0.08         0.0345         0.2917         0.3333        0.0130   \n",
       "2            NaN            NaN            NaN            NaN           NaN   \n",
       "3            NaN            NaN            NaN            NaN           NaN   \n",
       "4            NaN            NaN            NaN            NaN           NaN   \n",
       "\n",
       "   LIVINGAPARTMENTS_AVG  LIVINGAREA_AVG  NONLIVINGAPARTMENTS_AVG  \\\n",
       "0                0.0202          0.0190                   0.0000   \n",
       "1                0.0773          0.0549                   0.0039   \n",
       "2                   NaN             NaN                      NaN   \n",
       "3                   NaN             NaN                      NaN   \n",
       "4                   NaN             NaN                      NaN   \n",
       "\n",
       "   NONLIVINGAREA_AVG  APARTMENTS_MODE  BASEMENTAREA_MODE  \\\n",
       "0             0.0000           0.0252             0.0383   \n",
       "1             0.0098           0.0924             0.0538   \n",
       "2                NaN              NaN                NaN   \n",
       "3                NaN              NaN                NaN   \n",
       "4                NaN              NaN                NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_MODE  YEARS_BUILD_MODE  COMMONAREA_MODE  \\\n",
       "0                        0.9722            0.6341           0.0144   \n",
       "1                        0.9851            0.8040           0.0497   \n",
       "2                           NaN               NaN              NaN   \n",
       "3                           NaN               NaN              NaN   \n",
       "4                           NaN               NaN              NaN   \n",
       "\n",
       "   ELEVATORS_MODE  ENTRANCES_MODE  FLOORSMAX_MODE  FLOORSMIN_MODE  \\\n",
       "0          0.0000          0.0690          0.0833          0.1250   \n",
       "1          0.0806          0.0345          0.2917          0.3333   \n",
       "2             NaN             NaN             NaN             NaN   \n",
       "3             NaN             NaN             NaN             NaN   \n",
       "4             NaN             NaN             NaN             NaN   \n",
       "\n",
       "   LANDAREA_MODE  LIVINGAPARTMENTS_MODE  LIVINGAREA_MODE  \\\n",
       "0         0.0377                  0.022           0.0198   \n",
       "1         0.0128                  0.079           0.0554   \n",
       "2            NaN                    NaN              NaN   \n",
       "3            NaN                    NaN              NaN   \n",
       "4            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MODE  NONLIVINGAREA_MODE  APARTMENTS_MEDI  \\\n",
       "0                       0.0                 0.0           0.0250   \n",
       "1                       0.0                 0.0           0.0968   \n",
       "2                       NaN                 NaN              NaN   \n",
       "3                       NaN                 NaN              NaN   \n",
       "4                       NaN                 NaN              NaN   \n",
       "\n",
       "   BASEMENTAREA_MEDI  YEARS_BEGINEXPLUATATION_MEDI  YEARS_BUILD_MEDI  \\\n",
       "0             0.0369                        0.9722            0.6243   \n",
       "1             0.0529                        0.9851            0.7987   \n",
       "2                NaN                           NaN               NaN   \n",
       "3                NaN                           NaN               NaN   \n",
       "4                NaN                           NaN               NaN   \n",
       "\n",
       "   COMMONAREA_MEDI  ELEVATORS_MEDI  ENTRANCES_MEDI  FLOORSMAX_MEDI  \\\n",
       "0           0.0144            0.00          0.0690          0.0833   \n",
       "1           0.0608            0.08          0.0345          0.2917   \n",
       "2              NaN             NaN             NaN             NaN   \n",
       "3              NaN             NaN             NaN             NaN   \n",
       "4              NaN             NaN             NaN             NaN   \n",
       "\n",
       "   FLOORSMIN_MEDI  LANDAREA_MEDI  LIVINGAPARTMENTS_MEDI  LIVINGAREA_MEDI  \\\n",
       "0          0.1250         0.0375                 0.0205           0.0193   \n",
       "1          0.3333         0.0132                 0.0787           0.0558   \n",
       "2             NaN            NaN                    NaN              NaN   \n",
       "3             NaN            NaN                    NaN              NaN   \n",
       "4             NaN            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MEDI  NONLIVINGAREA_MEDI FONDKAPREMONT_MODE  \\\n",
       "0                    0.0000                0.00   reg oper account   \n",
       "1                    0.0039                0.01   reg oper account   \n",
       "2                       NaN                 NaN                NaN   \n",
       "3                       NaN                 NaN                NaN   \n",
       "4                       NaN                 NaN                NaN   \n",
       "\n",
       "   HOUSETYPE_MODE  TOTALAREA_MODE WALLSMATERIAL_MODE EMERGENCYSTATE_MODE  \\\n",
       "0  block of flats          0.0149       Stone, brick                  No   \n",
       "1  block of flats          0.0714              Block                  No   \n",
       "2             NaN             NaN                NaN                 NaN   \n",
       "3             NaN             NaN                NaN                 NaN   \n",
       "4             NaN             NaN                NaN                 NaN   \n",
       "\n",
       "   OBS_30_CNT_SOCIAL_CIRCLE  DEF_30_CNT_SOCIAL_CIRCLE  \\\n",
       "0                       2.0                       2.0   \n",
       "1                       1.0                       0.0   \n",
       "2                       0.0                       0.0   \n",
       "3                       2.0                       0.0   \n",
       "4                       0.0                       0.0   \n",
       "\n",
       "   OBS_60_CNT_SOCIAL_CIRCLE  DEF_60_CNT_SOCIAL_CIRCLE  DAYS_LAST_PHONE_CHANGE  \\\n",
       "0                       2.0                       2.0                 -1134.0   \n",
       "1                       1.0                       0.0                  -828.0   \n",
       "2                       0.0                       0.0                  -815.0   \n",
       "3                       2.0                       0.0                  -617.0   \n",
       "4                       0.0                       0.0                 -1106.0   \n",
       "\n",
       "   FLAG_DOCUMENT_2  FLAG_DOCUMENT_3  FLAG_DOCUMENT_4  FLAG_DOCUMENT_5  \\\n",
       "0                0                1                0                0   \n",
       "1                0                1                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                1                0                0   \n",
       "4                0                0                0                0   \n",
       "\n",
       "   FLAG_DOCUMENT_6  FLAG_DOCUMENT_7  FLAG_DOCUMENT_8  FLAG_DOCUMENT_9  \\\n",
       "0                0                0                0                0   \n",
       "1                0                0                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                0                0                0   \n",
       "4                0                0                1                0   \n",
       "\n",
       "   FLAG_DOCUMENT_10  FLAG_DOCUMENT_11  FLAG_DOCUMENT_12  FLAG_DOCUMENT_13  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_14  FLAG_DOCUMENT_15  FLAG_DOCUMENT_16  FLAG_DOCUMENT_17  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_18  FLAG_DOCUMENT_19  FLAG_DOCUMENT_20  FLAG_DOCUMENT_21  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_HOUR  AMT_REQ_CREDIT_BUREAU_DAY  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_WEEK  AMT_REQ_CREDIT_BUREAU_MON  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_QRT  AMT_REQ_CREDIT_BUREAU_YEAR  \n",
       "0                        0.0                         1.0  \n",
       "1                        0.0                         0.0  \n",
       "2                        0.0                         0.0  \n",
       "3                        NaN                         NaN  \n",
       "4                        0.0                         0.0  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "application_train_df = pd.read_csv('dataset/application_train.csv')\n",
    "application_train_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714463</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-208</td>\n",
       "      <td>0</td>\n",
       "      <td>1075.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>171342.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-20</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714464</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-203</td>\n",
       "      <td>0</td>\n",
       "      <td>528.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>464323.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-16</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714465</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-203</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>90000.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-16</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714466</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-629</td>\n",
       "      <td>0</td>\n",
       "      <td>1197.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77674.5</td>\n",
       "      <td>0</td>\n",
       "      <td>2700000.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-21</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "0      215354       5714462        Closed      currency 1         -497   \n",
       "1      215354       5714463        Active      currency 1         -208   \n",
       "2      215354       5714464        Active      currency 1         -203   \n",
       "3      215354       5714465        Active      currency 1         -203   \n",
       "4      215354       5714466        Active      currency 1         -629   \n",
       "\n",
       "   CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "0                   0               -153.0             -153.0   \n",
       "1                   0               1075.0                NaN   \n",
       "2                   0                528.0                NaN   \n",
       "3                   0                  NaN                NaN   \n",
       "4                   0               1197.0                NaN   \n",
       "\n",
       "   AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "0                     NaN                   0         91323.0   \n",
       "1                     NaN                   0        225000.0   \n",
       "2                     NaN                   0        464323.5   \n",
       "3                     NaN                   0         90000.0   \n",
       "4                 77674.5                   0       2700000.0   \n",
       "\n",
       "   AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "0                  0.0                   NaN                     0.0   \n",
       "1             171342.0                   NaN                     0.0   \n",
       "2                  NaN                   NaN                     0.0   \n",
       "3                  NaN                   NaN                     0.0   \n",
       "4                  NaN                   NaN                     0.0   \n",
       "\n",
       "       CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "0  Consumer credit                -131          NaN  \n",
       "1      Credit card                 -20          NaN  \n",
       "2  Consumer credit                 -16          NaN  \n",
       "3      Credit card                 -16          NaN  \n",
       "4  Consumer credit                 -21          NaN  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df = pd.read_csv('dataset/bureau.csv')\n",
    "bureau_full_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1029843</th>\n",
       "      <td>344105</td>\n",
       "      <td>6182156</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2092</td>\n",
       "      <td>0</td>\n",
       "      <td>-1935.0</td>\n",
       "      <td>-1935.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>54000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1321</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "1029843      344105       6182156        Closed      currency 1        -2092   \n",
       "\n",
       "         CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "1029843                   0              -1935.0            -1935.0   \n",
       "\n",
       "         AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "1029843                     NaN                   0         54000.0   \n",
       "\n",
       "         AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "1029843                  0.0                   0.0                     0.0   \n",
       "\n",
       "             CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "1029843  Consumer credit               -1321          NaN  "
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_BUREAU == 6182156]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>NAME_CONTRACT_TYPE</th>\n",
       "      <th>CODE_GENDER</th>\n",
       "      <th>FLAG_OWN_CAR</th>\n",
       "      <th>FLAG_OWN_REALTY</th>\n",
       "      <th>CNT_CHILDREN</th>\n",
       "      <th>AMT_INCOME_TOTAL</th>\n",
       "      <th>AMT_CREDIT</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>AMT_GOODS_PRICE</th>\n",
       "      <th>NAME_TYPE_SUITE</th>\n",
       "      <th>NAME_INCOME_TYPE</th>\n",
       "      <th>NAME_EDUCATION_TYPE</th>\n",
       "      <th>NAME_FAMILY_STATUS</th>\n",
       "      <th>NAME_HOUSING_TYPE</th>\n",
       "      <th>REGION_POPULATION_RELATIVE</th>\n",
       "      <th>DAYS_BIRTH</th>\n",
       "      <th>DAYS_EMPLOYED</th>\n",
       "      <th>DAYS_REGISTRATION</th>\n",
       "      <th>DAYS_ID_PUBLISH</th>\n",
       "      <th>OWN_CAR_AGE</th>\n",
       "      <th>FLAG_MOBIL</th>\n",
       "      <th>FLAG_EMP_PHONE</th>\n",
       "      <th>FLAG_WORK_PHONE</th>\n",
       "      <th>FLAG_CONT_MOBILE</th>\n",
       "      <th>FLAG_PHONE</th>\n",
       "      <th>FLAG_EMAIL</th>\n",
       "      <th>OCCUPATION_TYPE</th>\n",
       "      <th>CNT_FAM_MEMBERS</th>\n",
       "      <th>REGION_RATING_CLIENT</th>\n",
       "      <th>REGION_RATING_CLIENT_W_CITY</th>\n",
       "      <th>WEEKDAY_APPR_PROCESS_START</th>\n",
       "      <th>HOUR_APPR_PROCESS_START</th>\n",
       "      <th>REG_REGION_NOT_LIVE_REGION</th>\n",
       "      <th>REG_REGION_NOT_WORK_REGION</th>\n",
       "      <th>LIVE_REGION_NOT_WORK_REGION</th>\n",
       "      <th>REG_CITY_NOT_LIVE_CITY</th>\n",
       "      <th>REG_CITY_NOT_WORK_CITY</th>\n",
       "      <th>LIVE_CITY_NOT_WORK_CITY</th>\n",
       "      <th>ORGANIZATION_TYPE</th>\n",
       "      <th>EXT_SOURCE_1</th>\n",
       "      <th>EXT_SOURCE_2</th>\n",
       "      <th>EXT_SOURCE_3</th>\n",
       "      <th>APARTMENTS_AVG</th>\n",
       "      <th>BASEMENTAREA_AVG</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_AVG</th>\n",
       "      <th>YEARS_BUILD_AVG</th>\n",
       "      <th>COMMONAREA_AVG</th>\n",
       "      <th>ELEVATORS_AVG</th>\n",
       "      <th>ENTRANCES_AVG</th>\n",
       "      <th>FLOORSMAX_AVG</th>\n",
       "      <th>FLOORSMIN_AVG</th>\n",
       "      <th>LANDAREA_AVG</th>\n",
       "      <th>LIVINGAPARTMENTS_AVG</th>\n",
       "      <th>LIVINGAREA_AVG</th>\n",
       "      <th>NONLIVINGAPARTMENTS_AVG</th>\n",
       "      <th>NONLIVINGAREA_AVG</th>\n",
       "      <th>APARTMENTS_MODE</th>\n",
       "      <th>BASEMENTAREA_MODE</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MODE</th>\n",
       "      <th>YEARS_BUILD_MODE</th>\n",
       "      <th>COMMONAREA_MODE</th>\n",
       "      <th>ELEVATORS_MODE</th>\n",
       "      <th>ENTRANCES_MODE</th>\n",
       "      <th>FLOORSMAX_MODE</th>\n",
       "      <th>FLOORSMIN_MODE</th>\n",
       "      <th>LANDAREA_MODE</th>\n",
       "      <th>LIVINGAPARTMENTS_MODE</th>\n",
       "      <th>LIVINGAREA_MODE</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MODE</th>\n",
       "      <th>NONLIVINGAREA_MODE</th>\n",
       "      <th>APARTMENTS_MEDI</th>\n",
       "      <th>BASEMENTAREA_MEDI</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MEDI</th>\n",
       "      <th>YEARS_BUILD_MEDI</th>\n",
       "      <th>COMMONAREA_MEDI</th>\n",
       "      <th>ELEVATORS_MEDI</th>\n",
       "      <th>ENTRANCES_MEDI</th>\n",
       "      <th>FLOORSMAX_MEDI</th>\n",
       "      <th>FLOORSMIN_MEDI</th>\n",
       "      <th>LANDAREA_MEDI</th>\n",
       "      <th>LIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>LIVINGAREA_MEDI</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>NONLIVINGAREA_MEDI</th>\n",
       "      <th>FONDKAPREMONT_MODE</th>\n",
       "      <th>HOUSETYPE_MODE</th>\n",
       "      <th>TOTALAREA_MODE</th>\n",
       "      <th>WALLSMATERIAL_MODE</th>\n",
       "      <th>EMERGENCYSTATE_MODE</th>\n",
       "      <th>OBS_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>OBS_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DAYS_LAST_PHONE_CHANGE</th>\n",
       "      <th>FLAG_DOCUMENT_2</th>\n",
       "      <th>FLAG_DOCUMENT_3</th>\n",
       "      <th>FLAG_DOCUMENT_4</th>\n",
       "      <th>FLAG_DOCUMENT_5</th>\n",
       "      <th>FLAG_DOCUMENT_6</th>\n",
       "      <th>FLAG_DOCUMENT_7</th>\n",
       "      <th>FLAG_DOCUMENT_8</th>\n",
       "      <th>FLAG_DOCUMENT_9</th>\n",
       "      <th>FLAG_DOCUMENT_10</th>\n",
       "      <th>FLAG_DOCUMENT_11</th>\n",
       "      <th>FLAG_DOCUMENT_12</th>\n",
       "      <th>FLAG_DOCUMENT_13</th>\n",
       "      <th>FLAG_DOCUMENT_14</th>\n",
       "      <th>FLAG_DOCUMENT_15</th>\n",
       "      <th>FLAG_DOCUMENT_16</th>\n",
       "      <th>FLAG_DOCUMENT_17</th>\n",
       "      <th>FLAG_DOCUMENT_18</th>\n",
       "      <th>FLAG_DOCUMENT_19</th>\n",
       "      <th>FLAG_DOCUMENT_20</th>\n",
       "      <th>FLAG_DOCUMENT_21</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_HOUR</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_DAY</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_WEEK</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_MON</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_QRT</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_YEAR</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>210645</th>\n",
       "      <td>344105</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>1</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>298512.0</td>\n",
       "      <td>17266.5</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.0105</td>\n",
       "      <td>-11405</td>\n",
       "      <td>-1096</td>\n",
       "      <td>-2749.0</td>\n",
       "      <td>-3315</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>12</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.529015</td>\n",
       "      <td>0.791075</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1575.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  TARGET NAME_CONTRACT_TYPE CODE_GENDER FLAG_OWN_CAR  \\\n",
       "210645      344105       0         Cash loans           F            N   \n",
       "\n",
       "       FLAG_OWN_REALTY  CNT_CHILDREN  AMT_INCOME_TOTAL  AMT_CREDIT  \\\n",
       "210645               Y             1           67500.0    298512.0   \n",
       "\n",
       "        AMT_ANNUITY  AMT_GOODS_PRICE NAME_TYPE_SUITE NAME_INCOME_TYPE  \\\n",
       "210645      17266.5         270000.0   Unaccompanied          Working   \n",
       "\n",
       "                  NAME_EDUCATION_TYPE NAME_FAMILY_STATUS  NAME_HOUSING_TYPE  \\\n",
       "210645  Secondary / secondary special            Married  House / apartment   \n",
       "\n",
       "        REGION_POPULATION_RELATIVE  DAYS_BIRTH  DAYS_EMPLOYED  \\\n",
       "210645                      0.0105      -11405          -1096   \n",
       "\n",
       "        DAYS_REGISTRATION  DAYS_ID_PUBLISH  OWN_CAR_AGE  FLAG_MOBIL  \\\n",
       "210645            -2749.0            -3315          NaN           1   \n",
       "\n",
       "        FLAG_EMP_PHONE  FLAG_WORK_PHONE  FLAG_CONT_MOBILE  FLAG_PHONE  \\\n",
       "210645               1                1                 1           1   \n",
       "\n",
       "        FLAG_EMAIL OCCUPATION_TYPE  CNT_FAM_MEMBERS  REGION_RATING_CLIENT  \\\n",
       "210645           0        Laborers              3.0                     3   \n",
       "\n",
       "        REGION_RATING_CLIENT_W_CITY WEEKDAY_APPR_PROCESS_START  \\\n",
       "210645                            3                     MONDAY   \n",
       "\n",
       "        HOUR_APPR_PROCESS_START  REG_REGION_NOT_LIVE_REGION  \\\n",
       "210645                       12                           0   \n",
       "\n",
       "        REG_REGION_NOT_WORK_REGION  LIVE_REGION_NOT_WORK_REGION  \\\n",
       "210645                           0                            0   \n",
       "\n",
       "        REG_CITY_NOT_LIVE_CITY  REG_CITY_NOT_WORK_CITY  \\\n",
       "210645                       0                       0   \n",
       "\n",
       "        LIVE_CITY_NOT_WORK_CITY       ORGANIZATION_TYPE  EXT_SOURCE_1  \\\n",
       "210645                        0  Business Entity Type 3           NaN   \n",
       "\n",
       "        EXT_SOURCE_2  EXT_SOURCE_3  APARTMENTS_AVG  BASEMENTAREA_AVG  \\\n",
       "210645      0.529015      0.791075             NaN               NaN   \n",
       "\n",
       "        YEARS_BEGINEXPLUATATION_AVG  YEARS_BUILD_AVG  COMMONAREA_AVG  \\\n",
       "210645                          NaN              NaN             NaN   \n",
       "\n",
       "        ELEVATORS_AVG  ENTRANCES_AVG  FLOORSMAX_AVG  FLOORSMIN_AVG  \\\n",
       "210645            NaN            NaN            NaN            NaN   \n",
       "\n",
       "        LANDAREA_AVG  LIVINGAPARTMENTS_AVG  LIVINGAREA_AVG  \\\n",
       "210645           NaN                   NaN             NaN   \n",
       "\n",
       "        NONLIVINGAPARTMENTS_AVG  NONLIVINGAREA_AVG  APARTMENTS_MODE  \\\n",
       "210645                      NaN                NaN              NaN   \n",
       "\n",
       "        BASEMENTAREA_MODE  YEARS_BEGINEXPLUATATION_MODE  YEARS_BUILD_MODE  \\\n",
       "210645                NaN                           NaN               NaN   \n",
       "\n",
       "        COMMONAREA_MODE  ELEVATORS_MODE  ENTRANCES_MODE  FLOORSMAX_MODE  \\\n",
       "210645              NaN             NaN             NaN             NaN   \n",
       "\n",
       "        FLOORSMIN_MODE  LANDAREA_MODE  LIVINGAPARTMENTS_MODE  LIVINGAREA_MODE  \\\n",
       "210645             NaN            NaN                    NaN              NaN   \n",
       "\n",
       "        NONLIVINGAPARTMENTS_MODE  NONLIVINGAREA_MODE  APARTMENTS_MEDI  \\\n",
       "210645                       NaN                 NaN              NaN   \n",
       "\n",
       "        BASEMENTAREA_MEDI  YEARS_BEGINEXPLUATATION_MEDI  YEARS_BUILD_MEDI  \\\n",
       "210645                NaN                           NaN               NaN   \n",
       "\n",
       "        COMMONAREA_MEDI  ELEVATORS_MEDI  ENTRANCES_MEDI  FLOORSMAX_MEDI  \\\n",
       "210645              NaN             NaN             NaN             NaN   \n",
       "\n",
       "        FLOORSMIN_MEDI  LANDAREA_MEDI  LIVINGAPARTMENTS_MEDI  LIVINGAREA_MEDI  \\\n",
       "210645             NaN            NaN                    NaN              NaN   \n",
       "\n",
       "        NONLIVINGAPARTMENTS_MEDI  NONLIVINGAREA_MEDI FONDKAPREMONT_MODE  \\\n",
       "210645                       NaN                 NaN                NaN   \n",
       "\n",
       "       HOUSETYPE_MODE  TOTALAREA_MODE WALLSMATERIAL_MODE EMERGENCYSTATE_MODE  \\\n",
       "210645            NaN             NaN                NaN                 NaN   \n",
       "\n",
       "        OBS_30_CNT_SOCIAL_CIRCLE  DEF_30_CNT_SOCIAL_CIRCLE  \\\n",
       "210645                       0.0                       0.0   \n",
       "\n",
       "        OBS_60_CNT_SOCIAL_CIRCLE  DEF_60_CNT_SOCIAL_CIRCLE  \\\n",
       "210645                       0.0                       0.0   \n",
       "\n",
       "        DAYS_LAST_PHONE_CHANGE  FLAG_DOCUMENT_2  FLAG_DOCUMENT_3  \\\n",
       "210645                 -1575.0                0                1   \n",
       "\n",
       "        FLAG_DOCUMENT_4  FLAG_DOCUMENT_5  FLAG_DOCUMENT_6  FLAG_DOCUMENT_7  \\\n",
       "210645                0                0                0                0   \n",
       "\n",
       "        FLAG_DOCUMENT_8  FLAG_DOCUMENT_9  FLAG_DOCUMENT_10  FLAG_DOCUMENT_11  \\\n",
       "210645                0                0                 0                 0   \n",
       "\n",
       "        FLAG_DOCUMENT_12  FLAG_DOCUMENT_13  FLAG_DOCUMENT_14  \\\n",
       "210645                 0                 0                 0   \n",
       "\n",
       "        FLAG_DOCUMENT_15  FLAG_DOCUMENT_16  FLAG_DOCUMENT_17  \\\n",
       "210645                 0                 0                 0   \n",
       "\n",
       "        FLAG_DOCUMENT_18  FLAG_DOCUMENT_19  FLAG_DOCUMENT_20  \\\n",
       "210645                 0                 0                 0   \n",
       "\n",
       "        FLAG_DOCUMENT_21  AMT_REQ_CREDIT_BUREAU_HOUR  \\\n",
       "210645                 0                         0.0   \n",
       "\n",
       "        AMT_REQ_CREDIT_BUREAU_DAY  AMT_REQ_CREDIT_BUREAU_WEEK  \\\n",
       "210645                        0.0                         0.0   \n",
       "\n",
       "        AMT_REQ_CREDIT_BUREAU_MON  AMT_REQ_CREDIT_BUREAU_QRT  \\\n",
       "210645                        0.0                        0.0   \n",
       "\n",
       "        AMT_REQ_CREDIT_BUREAU_YEAR  \n",
       "210645                         1.0  "
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "application_train_df[application_train_df.SK_ID_CURR == 344105]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [SK_ID_BUREAU, MONTHS_BALANCE, STATUS, STATUS_NUMBER, RISK_SCORE]\n",
       "Index: []"
      ]
     },
     "execution_count": 148,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6182156]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Bureau features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5715448</td>\n",
       "      <td>0</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-1</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-2</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-3</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-4</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU  MONTHS_BALANCE STATUS\n",
       "0       5715448               0      C\n",
       "1       5715448              -1      C\n",
       "2       5715448              -2      C\n",
       "3       5715448              -3      C\n",
       "4       5715448              -4      C"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Montagem da tabela relacionada ao bureau\n",
    "bureau_full_df = pd.read_csv('dataset/bureau.csv')\n",
    "bureau_balance_df = pd.read_csv('dataset/bureau_balance.csv')\n",
    "#bureau_full_df = bureau_df.join(bureau_balance_df.set_index('SK_ID_BUREAU'), on='SK_ID_BUREAU')\n",
    "\n",
    "# Adicionando o target para facilitar analises futuras e treinamento do meu futuro modelo\n",
    "#bureau_full_df = bureau_full_df.join(application_train_df.set_index('SK_ID_CURR')['TARGET'], on='SK_ID_CURR')\n",
    "bureau_balance_df.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>675684</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>675685</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>675686</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>675687</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>675688</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>675689</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1337779</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1486113</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "675684       100002       6158904        Closed      currency 1        -1125   \n",
       "675685       100002       6158905        Closed      currency 1         -476   \n",
       "675686       100002       6158906        Closed      currency 1        -1437   \n",
       "675687       100002       6158907        Closed      currency 1        -1121   \n",
       "675688       100002       6158908        Closed      currency 1         -645   \n",
       "675689       100002       6158909        Active      currency 1         -103   \n",
       "1337779      100002       6158903        Active      currency 1        -1042   \n",
       "1486113      100002       6113835        Closed      currency 1        -1043   \n",
       "\n",
       "         CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "675684                    0              -1038.0            -1038.0   \n",
       "675685                    0                  NaN              -48.0   \n",
       "675686                    0              -1072.0            -1185.0   \n",
       "675687                    0               -911.0             -911.0   \n",
       "675688                    0                 85.0              -36.0   \n",
       "675689                    0                  NaN                NaN   \n",
       "1337779                   0                780.0                NaN   \n",
       "1486113                   0                 62.0             -967.0   \n",
       "\n",
       "         AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "675684                      NaN                   0       40761.000   \n",
       "675685                      NaN                   0           0.000   \n",
       "675686                    0.000                   0      135000.000   \n",
       "675687                 3321.000                   0       19071.000   \n",
       "675688                 5043.645                   0      120735.000   \n",
       "675689                   40.500                   0       31988.565   \n",
       "1337779                     NaN                   0      450000.000   \n",
       "1486113                   0.000                   0       67500.000   \n",
       "\n",
       "         AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "675684                   NaN                   NaN                     0.0   \n",
       "675685                   0.0                   NaN                     0.0   \n",
       "675686                   0.0                 0.000                     0.0   \n",
       "675687                   NaN                   NaN                     0.0   \n",
       "675688                   0.0                 0.000                     0.0   \n",
       "675689                   0.0             31988.565                     0.0   \n",
       "1337779             245781.0                 0.000                     0.0   \n",
       "1486113                  NaN                   NaN                     0.0   \n",
       "\n",
       "             CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "675684       Credit card               -1038          0.0  \n",
       "675685       Credit card                 -47          NaN  \n",
       "675686   Consumer credit               -1185          0.0  \n",
       "675687   Consumer credit                -906          0.0  \n",
       "675688   Consumer credit                 -34          0.0  \n",
       "675689       Credit card                 -24          0.0  \n",
       "1337779  Consumer credit                  -7          0.0  \n",
       "1486113      Credit card                -758          0.0  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 100002]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>13472836</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-21</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472837</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-22</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472838</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-23</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472839</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-24</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472840</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-25</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472841</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-26</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472842</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-27</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472843</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-28</td>\n",
       "      <td>X</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472844</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-29</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472845</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-30</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472846</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-31</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472847</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-32</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472848</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-33</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472849</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-34</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472850</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-35</td>\n",
       "      <td>X</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13472851</th>\n",
       "      <td>6158907</td>\n",
       "      <td>-36</td>\n",
       "      <td>X</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          SK_ID_BUREAU  MONTHS_BALANCE STATUS\n",
       "13472836       6158907             -21      C\n",
       "13472837       6158907             -22      C\n",
       "13472838       6158907             -23      1\n",
       "13472839       6158907             -24      1\n",
       "13472840       6158907             -25      0\n",
       "13472841       6158907             -26      1\n",
       "13472842       6158907             -27      1\n",
       "13472843       6158907             -28      X\n",
       "13472844       6158907             -29      1\n",
       "13472845       6158907             -30      1\n",
       "13472846       6158907             -31      0\n",
       "13472847       6158907             -32      0\n",
       "13472848       6158907             -33      0\n",
       "13472849       6158907             -34      0\n",
       "13472850       6158907             -35      X\n",
       "13472851       6158907             -36      X"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6158907]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "bureau_balance_predict_df = pd.read_csv('dataset/bureau_balance_predict.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>495574</th>\n",
       "      <td>324542</td>\n",
       "      <td>6459896</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2071</td>\n",
       "      <td>0</td>\n",
       "      <td>-962.0</td>\n",
       "      <td>-962.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-701</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>495575</th>\n",
       "      <td>324542</td>\n",
       "      <td>6459898</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2379</td>\n",
       "      <td>0</td>\n",
       "      <td>1273.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>45000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-9</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>516692</th>\n",
       "      <td>324542</td>\n",
       "      <td>6459897</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2379</td>\n",
       "      <td>0</td>\n",
       "      <td>-2018.0</td>\n",
       "      <td>-2134.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>38250.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2105</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>516693</th>\n",
       "      <td>324542</td>\n",
       "      <td>6459899</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-815</td>\n",
       "      <td>0</td>\n",
       "      <td>-573.0</td>\n",
       "      <td>-573.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>89950.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-569</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "495574      324542       6459896        Closed      currency 1        -2071   \n",
       "495575      324542       6459898        Active      currency 1        -2379   \n",
       "516692      324542       6459897        Closed      currency 1        -2379   \n",
       "516693      324542       6459899        Closed      currency 1         -815   \n",
       "\n",
       "        CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "495574                   0               -962.0             -962.0   \n",
       "495575                   0               1273.0                NaN   \n",
       "516692                   0              -2018.0            -2134.0   \n",
       "516693                   0               -573.0             -573.0   \n",
       "\n",
       "        AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "495574                     NaN                   0             0.0   \n",
       "495575                     0.0                   0         45000.0   \n",
       "516692                     NaN                   0         38250.0   \n",
       "516693                     0.0                   0         89950.5   \n",
       "\n",
       "        AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "495574                  0.0                   0.0                     0.0   \n",
       "495575                  0.0                   0.0                     0.0   \n",
       "516692                  NaN                   NaN                     0.0   \n",
       "516693                  0.0                   0.0                     0.0   \n",
       "\n",
       "            CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "495574      Credit card                -701          NaN  \n",
       "495575      Credit card                  -9          NaN  \n",
       "516692  Consumer credit               -2105          NaN  \n",
       "516693  Consumer credit                -569          NaN  "
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 324542]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>predict</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100001.0</td>\n",
       "      <td>0.130487</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100002.0</td>\n",
       "      <td>0.124434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100005.0</td>\n",
       "      <td>0.115343</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100010.0</td>\n",
       "      <td>0.085188</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100013.0</td>\n",
       "      <td>0.079984</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR   predict\n",
       "0    100001.0  0.130487\n",
       "1    100002.0  0.124434\n",
       "2    100005.0  0.115343\n",
       "3    100010.0  0.085188\n",
       "4    100013.0  0.079984"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "group = bureau_balance_predict_df.groupby(by=['SK_ID_CURR'])['predict'].max().reset_index()\n",
    "group.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100004</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100007</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR\n",
       "0      100002\n",
       "1      100003\n",
       "2      100004\n",
       "3      100006\n",
       "4      100007"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "application_train_df['SK_ID_CURR'].to_frame().head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>predict</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100002</td>\n",
       "      <td>0.124434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100003</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100004</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100006</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100007</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR   predict\n",
       "0      100002  0.124434\n",
       "1      100003       NaN\n",
       "2      100004       NaN\n",
       "3      100006       NaN\n",
       "4      100007       NaN"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "application_train_df['SK_ID_CURR'].to_frame().merge(group, on=['SK_ID_CURR'], how='left').head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>predict</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>447034</th>\n",
       "      <td>100002.0</td>\n",
       "      <td>6158904</td>\n",
       "      <td>0.086324</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  SK_ID_BUREAU   predict\n",
       "447034    100002.0       6158904  0.086324"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_predict_df[bureau_balance_predict_df.SK_ID_BUREAU == 6158904]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['SK_ID_CURR', 'BUREAU_LOAN_COUNT', 'BUREAU_LOAN_TYPES',\n",
       "       'AVERAGE_LOAN_TYPE', 'ACTIVE_LOANS_PERCENTAGE', 'MIN_DAYS_DIFF',\n",
       "       'MAX_DAYS_DIFF', 'MEAN_DAYS_DIFF', 'STD_DAYS_DIFF',\n",
       "       'CREDIT_ENDDATE_PERCENTAGE', 'MIN_DAYS_ENDDATE_DIFF',\n",
       "       'MAX_DAYS_ENDDATE_DIFF', 'MEAN_DAYS_ENDDATE_DIFF',\n",
       "       'STD_DAYS_ENDDATE_DIFF', 'AVG_ENDDATE_FUTURE', 'TOTAL_CUSTOMER_DEBT',\n",
       "       'TOTAL_CUSTOMER_CREDIT', 'DEBT_CREDIT_RATIO', 'TOTAL_CUSTOMER_OVERDUE',\n",
       "       'OVERDUE_DEBT_RATIO', 'AVG_CREDITDAYS_PROLONGED'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>BUREAU_LOAN_COUNT</th>\n",
       "      <th>BUREAU_LOAN_TYPES</th>\n",
       "      <th>AVERAGE_LOAN_TYPE</th>\n",
       "      <th>ACTIVE_LOANS_PERCENTAGE</th>\n",
       "      <th>DAYS_DIFF</th>\n",
       "      <th>CREDIT_ENDDATE_PERCENTAGE</th>\n",
       "      <th>DAYS_ENDDATE_DIFF</th>\n",
       "      <th>AVG_ENDDATE_FUTURE</th>\n",
       "      <th>TOTAL_CUSTOMER_DEBT</th>\n",
       "      <th>TOTAL_CUSTOMER_CREDIT</th>\n",
       "      <th>DEBT_CREDIT_RATIO</th>\n",
       "      <th>TOTAL_CUSTOMER_OVERDUE</th>\n",
       "      <th>OVERDUE_DEBT_RATIO</th>\n",
       "      <th>AVG_CREDITDAYS_PROLONGED</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>365</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714943</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>98</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>366</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714944</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>370</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>367</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714945</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>118</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>368</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714947</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>261</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>313.0</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>369</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714948</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>109</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>257.0</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>370</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714952</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>817</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>371</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714953</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>273</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>372</th>\n",
       "      <td>282297</td>\n",
       "      <td>5714954</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3.666667</td>\n",
       "      <td>0.454545</td>\n",
       "      <td>0</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>0.0</td>\n",
       "      <td>190.000000</td>\n",
       "      <td>6.294134e+05</td>\n",
       "      <td>3.693748e+06</td>\n",
       "      <td>0.170400</td>\n",
       "      <td>231.525</td>\n",
       "      <td>3.678425e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>782</th>\n",
       "      <td>408647</td>\n",
       "      <td>5715465</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>160</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>344.000000</td>\n",
       "      <td>1.088064e+06</td>\n",
       "      <td>2.495084e+06</td>\n",
       "      <td>0.436083</td>\n",
       "      <td>288.000</td>\n",
       "      <td>2.646903e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>783</th>\n",
       "      <td>408647</td>\n",
       "      <td>5715466</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>1042</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>344.000000</td>\n",
       "      <td>1.088064e+06</td>\n",
       "      <td>2.495084e+06</td>\n",
       "      <td>0.436083</td>\n",
       "      <td>288.000</td>\n",
       "      <td>2.646903e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>784</th>\n",
       "      <td>408647</td>\n",
       "      <td>5715467</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>602</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>271.0</td>\n",
       "      <td>344.000000</td>\n",
       "      <td>1.088064e+06</td>\n",
       "      <td>2.495084e+06</td>\n",
       "      <td>0.436083</td>\n",
       "      <td>288.000</td>\n",
       "      <td>2.646903e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>785</th>\n",
       "      <td>408647</td>\n",
       "      <td>5715468</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>344.000000</td>\n",
       "      <td>1.088064e+06</td>\n",
       "      <td>2.495084e+06</td>\n",
       "      <td>0.436083</td>\n",
       "      <td>288.000</td>\n",
       "      <td>2.646903e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>786</th>\n",
       "      <td>408647</td>\n",
       "      <td>5715469</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>248</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>761.0</td>\n",
       "      <td>344.000000</td>\n",
       "      <td>1.088064e+06</td>\n",
       "      <td>2.495084e+06</td>\n",
       "      <td>0.436083</td>\n",
       "      <td>288.000</td>\n",
       "      <td>2.646903e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>936</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715645</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>1523</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>937</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715647</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>1</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>938</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715648</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>939</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715649</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>46</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>894.0</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>940</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715650</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>392</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>941</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715651</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>337</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>942</th>\n",
       "      <td>380677</td>\n",
       "      <td>5715652</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>190.800000</td>\n",
       "      <td>6.844095e+05</td>\n",
       "      <td>1.214273e+06</td>\n",
       "      <td>0.563637</td>\n",
       "      <td>58.500</td>\n",
       "      <td>8.547514e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1575</th>\n",
       "      <td>218135</td>\n",
       "      <td>5716400</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>214</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>3.375000e+05</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>504.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1576</th>\n",
       "      <td>218135</td>\n",
       "      <td>5716401</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>1635</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>3.375000e+05</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>504.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1577</th>\n",
       "      <td>218135</td>\n",
       "      <td>5716403</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>181</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>3.375000e+05</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>504.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1578</th>\n",
       "      <td>218135</td>\n",
       "      <td>5716404</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>3.375000e+05</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>504.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1788</th>\n",
       "      <td>229323</td>\n",
       "      <td>5716668</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>1</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.583465e+05</td>\n",
       "      <td>1.224909e+06</td>\n",
       "      <td>0.455827</td>\n",
       "      <td>169582.500</td>\n",
       "      <td>3.037227e-01</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1789</th>\n",
       "      <td>229323</td>\n",
       "      <td>5716669</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.583465e+05</td>\n",
       "      <td>1.224909e+06</td>\n",
       "      <td>0.455827</td>\n",
       "      <td>169582.500</td>\n",
       "      <td>3.037227e-01</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1790</th>\n",
       "      <td>229323</td>\n",
       "      <td>5716670</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>10</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.583465e+05</td>\n",
       "      <td>1.224909e+06</td>\n",
       "      <td>0.455827</td>\n",
       "      <td>169582.500</td>\n",
       "      <td>3.037227e-01</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1791</th>\n",
       "      <td>229323</td>\n",
       "      <td>5716671</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>4</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.583465e+05</td>\n",
       "      <td>1.224909e+06</td>\n",
       "      <td>0.455827</td>\n",
       "      <td>169582.500</td>\n",
       "      <td>3.037227e-01</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1792</th>\n",
       "      <td>229323</td>\n",
       "      <td>5716672</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>197</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.583465e+05</td>\n",
       "      <td>1.224909e+06</td>\n",
       "      <td>0.455827</td>\n",
       "      <td>169582.500</td>\n",
       "      <td>3.037227e-01</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1846</th>\n",
       "      <td>295460</td>\n",
       "      <td>5716740</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1.500000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>8.545500e+05</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>576.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714825</th>\n",
       "      <td>139770</td>\n",
       "      <td>5094158</td>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>0.055556</td>\n",
       "      <td>173</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5017.166667</td>\n",
       "      <td>5.225400e+04</td>\n",
       "      <td>1.847503e+06</td>\n",
       "      <td>0.028284</td>\n",
       "      <td>783.000</td>\n",
       "      <td>1.498450e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714826</th>\n",
       "      <td>139770</td>\n",
       "      <td>5094164</td>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>0.055556</td>\n",
       "      <td>0</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5017.166667</td>\n",
       "      <td>5.225400e+04</td>\n",
       "      <td>1.847503e+06</td>\n",
       "      <td>0.028284</td>\n",
       "      <td>783.000</td>\n",
       "      <td>1.498450e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714872</th>\n",
       "      <td>191765</td>\n",
       "      <td>5104468</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10236.666667</td>\n",
       "      <td>1.112310e+05</td>\n",
       "      <td>9.207360e+05</td>\n",
       "      <td>0.120807</td>\n",
       "      <td>4.500</td>\n",
       "      <td>4.045635e-05</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714873</th>\n",
       "      <td>191765</td>\n",
       "      <td>5104470</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10236.666667</td>\n",
       "      <td>1.112310e+05</td>\n",
       "      <td>9.207360e+05</td>\n",
       "      <td>0.120807</td>\n",
       "      <td>4.500</td>\n",
       "      <td>4.045635e-05</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714901</th>\n",
       "      <td>139563</td>\n",
       "      <td>5104705</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>601</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>145.000000</td>\n",
       "      <td>3.940452e+05</td>\n",
       "      <td>1.446845e+06</td>\n",
       "      <td>0.272348</td>\n",
       "      <td>9.000</td>\n",
       "      <td>2.284002e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1714902</th>\n",
       "      <td>139563</td>\n",
       "      <td>5104709</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>145.000000</td>\n",
       "      <td>3.940452e+05</td>\n",
       "      <td>1.446845e+06</td>\n",
       "      <td>0.272348</td>\n",
       "      <td>9.000</td>\n",
       "      <td>2.284002e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715016</th>\n",
       "      <td>349836</td>\n",
       "      <td>5073893</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>98</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.240695e+05</td>\n",
       "      <td>3.703185e+05</td>\n",
       "      <td>0.335035</td>\n",
       "      <td>4.500</td>\n",
       "      <td>3.626999e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715129</th>\n",
       "      <td>380522</td>\n",
       "      <td>5088112</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>1.666667</td>\n",
       "      <td>0.800000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.800000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1442.750000</td>\n",
       "      <td>3.593038e+06</td>\n",
       "      <td>6.256875e+06</td>\n",
       "      <td>0.574255</td>\n",
       "      <td>220.500</td>\n",
       "      <td>6.136867e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715200</th>\n",
       "      <td>423934</td>\n",
       "      <td>5094674</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.583333</td>\n",
       "      <td>303</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>201.0</td>\n",
       "      <td>127.000000</td>\n",
       "      <td>9.462870e+05</td>\n",
       "      <td>2.489296e+06</td>\n",
       "      <td>0.380142</td>\n",
       "      <td>16645.500</td>\n",
       "      <td>1.759033e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715201</th>\n",
       "      <td>423934</td>\n",
       "      <td>5094678</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.583333</td>\n",
       "      <td>235</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>127.000000</td>\n",
       "      <td>9.462870e+05</td>\n",
       "      <td>2.489296e+06</td>\n",
       "      <td>0.380142</td>\n",
       "      <td>16645.500</td>\n",
       "      <td>1.759033e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715301</th>\n",
       "      <td>175214</td>\n",
       "      <td>5044936</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "      <td>2.666667</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>288</td>\n",
       "      <td>0.625000</td>\n",
       "      <td>60.0</td>\n",
       "      <td>903.800000</td>\n",
       "      <td>1.615600e+07</td>\n",
       "      <td>2.374575e+07</td>\n",
       "      <td>0.680375</td>\n",
       "      <td>9.000</td>\n",
       "      <td>5.570685e-07</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715320</th>\n",
       "      <td>410990</td>\n",
       "      <td>5046342</td>\n",
       "      <td>13</td>\n",
       "      <td>2</td>\n",
       "      <td>6.500000</td>\n",
       "      <td>0.307692</td>\n",
       "      <td>57</td>\n",
       "      <td>0.307692</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7743.250000</td>\n",
       "      <td>3.748647e+05</td>\n",
       "      <td>3.131539e+06</td>\n",
       "      <td>0.119706</td>\n",
       "      <td>36.000</td>\n",
       "      <td>9.603466e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715448</th>\n",
       "      <td>102875</td>\n",
       "      <td>5052787</td>\n",
       "      <td>15</td>\n",
       "      <td>3</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>102</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>15.0</td>\n",
       "      <td>1203.000000</td>\n",
       "      <td>2.951487e+06</td>\n",
       "      <td>7.484517e+06</td>\n",
       "      <td>0.394346</td>\n",
       "      <td>36.000</td>\n",
       "      <td>1.219724e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715449</th>\n",
       "      <td>102875</td>\n",
       "      <td>5052790</td>\n",
       "      <td>15</td>\n",
       "      <td>3</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>38</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1203.000000</td>\n",
       "      <td>2.951487e+06</td>\n",
       "      <td>7.484517e+06</td>\n",
       "      <td>0.394346</td>\n",
       "      <td>36.000</td>\n",
       "      <td>1.219724e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715450</th>\n",
       "      <td>102875</td>\n",
       "      <td>5052792</td>\n",
       "      <td>15</td>\n",
       "      <td>3</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1203.000000</td>\n",
       "      <td>2.951487e+06</td>\n",
       "      <td>7.484517e+06</td>\n",
       "      <td>0.394346</td>\n",
       "      <td>36.000</td>\n",
       "      <td>1.219724e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715462</th>\n",
       "      <td>191065</td>\n",
       "      <td>5052946</td>\n",
       "      <td>13</td>\n",
       "      <td>3</td>\n",
       "      <td>4.333333</td>\n",
       "      <td>0.230769</td>\n",
       "      <td>245</td>\n",
       "      <td>0.307692</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7710.250000</td>\n",
       "      <td>2.842650e+05</td>\n",
       "      <td>3.540578e+06</td>\n",
       "      <td>0.080288</td>\n",
       "      <td>9085.500</td>\n",
       "      <td>3.196137e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715463</th>\n",
       "      <td>191065</td>\n",
       "      <td>5052948</td>\n",
       "      <td>13</td>\n",
       "      <td>3</td>\n",
       "      <td>4.333333</td>\n",
       "      <td>0.230769</td>\n",
       "      <td>445</td>\n",
       "      <td>0.307692</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7710.250000</td>\n",
       "      <td>2.842650e+05</td>\n",
       "      <td>3.540578e+06</td>\n",
       "      <td>0.080288</td>\n",
       "      <td>9085.500</td>\n",
       "      <td>3.196137e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715626</th>\n",
       "      <td>225755</td>\n",
       "      <td>5045159</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4.500000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>0</td>\n",
       "      <td>0.555556</td>\n",
       "      <td>130.0</td>\n",
       "      <td>275.800000</td>\n",
       "      <td>1.676498e+06</td>\n",
       "      <td>4.330048e+06</td>\n",
       "      <td>0.387178</td>\n",
       "      <td>131832.000</td>\n",
       "      <td>7.863537e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715627</th>\n",
       "      <td>225755</td>\n",
       "      <td>5045160</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4.500000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>261</td>\n",
       "      <td>0.555556</td>\n",
       "      <td>0.0</td>\n",
       "      <td>275.800000</td>\n",
       "      <td>1.676498e+06</td>\n",
       "      <td>4.330048e+06</td>\n",
       "      <td>0.387178</td>\n",
       "      <td>131832.000</td>\n",
       "      <td>7.863537e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715628</th>\n",
       "      <td>225755</td>\n",
       "      <td>5045164</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4.500000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>327</td>\n",
       "      <td>0.555556</td>\n",
       "      <td>NaN</td>\n",
       "      <td>275.800000</td>\n",
       "      <td>1.676498e+06</td>\n",
       "      <td>4.330048e+06</td>\n",
       "      <td>0.387178</td>\n",
       "      <td>131832.000</td>\n",
       "      <td>7.863537e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715629</th>\n",
       "      <td>225755</td>\n",
       "      <td>5045165</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4.500000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>0</td>\n",
       "      <td>0.555556</td>\n",
       "      <td>NaN</td>\n",
       "      <td>275.800000</td>\n",
       "      <td>1.676498e+06</td>\n",
       "      <td>4.330048e+06</td>\n",
       "      <td>0.387178</td>\n",
       "      <td>131832.000</td>\n",
       "      <td>7.863537e-02</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715871</th>\n",
       "      <td>169437</td>\n",
       "      <td>5054640</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>0.750000</td>\n",
       "      <td>3</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>35.000000</td>\n",
       "      <td>2.259585e+05</td>\n",
       "      <td>3.092175e+05</td>\n",
       "      <td>0.730743</td>\n",
       "      <td>760.500</td>\n",
       "      <td>3.365662e-03</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715938</th>\n",
       "      <td>405928</td>\n",
       "      <td>5056854</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>510</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>92.500000</td>\n",
       "      <td>3.219424e+05</td>\n",
       "      <td>1.794085e+06</td>\n",
       "      <td>0.179447</td>\n",
       "      <td>12817.710</td>\n",
       "      <td>3.981367e-02</td>\n",
       "      <td>0.083333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715952</th>\n",
       "      <td>433357</td>\n",
       "      <td>5057006</td>\n",
       "      <td>14</td>\n",
       "      <td>2</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>0.642857</td>\n",
       "      <td>32</td>\n",
       "      <td>0.785714</td>\n",
       "      <td>31.0</td>\n",
       "      <td>132.272727</td>\n",
       "      <td>1.043053e+06</td>\n",
       "      <td>2.383956e+06</td>\n",
       "      <td>0.437530</td>\n",
       "      <td>873.000</td>\n",
       "      <td>8.369664e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715953</th>\n",
       "      <td>433357</td>\n",
       "      <td>5057010</td>\n",
       "      <td>14</td>\n",
       "      <td>2</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>0.642857</td>\n",
       "      <td>0</td>\n",
       "      <td>0.785714</td>\n",
       "      <td>282.0</td>\n",
       "      <td>132.272727</td>\n",
       "      <td>1.043053e+06</td>\n",
       "      <td>2.383956e+06</td>\n",
       "      <td>0.437530</td>\n",
       "      <td>873.000</td>\n",
       "      <td>8.369664e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1715954</th>\n",
       "      <td>433357</td>\n",
       "      <td>5057011</td>\n",
       "      <td>14</td>\n",
       "      <td>2</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>0.642857</td>\n",
       "      <td>0</td>\n",
       "      <td>0.785714</td>\n",
       "      <td>118.0</td>\n",
       "      <td>132.272727</td>\n",
       "      <td>1.043053e+06</td>\n",
       "      <td>2.383956e+06</td>\n",
       "      <td>0.437530</td>\n",
       "      <td>873.000</td>\n",
       "      <td>8.369664e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716016</th>\n",
       "      <td>363517</td>\n",
       "      <td>5043757</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>433</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.197405e+05</td>\n",
       "      <td>2.029529e+06</td>\n",
       "      <td>0.058999</td>\n",
       "      <td>99.000</td>\n",
       "      <td>8.267879e-04</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716215</th>\n",
       "      <td>379272</td>\n",
       "      <td>5051674</td>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>9</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3442.222222</td>\n",
       "      <td>1.562409e+05</td>\n",
       "      <td>2.582819e+06</td>\n",
       "      <td>0.060492</td>\n",
       "      <td>13.500</td>\n",
       "      <td>8.640506e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716216</th>\n",
       "      <td>379272</td>\n",
       "      <td>5051677</td>\n",
       "      <td>18</td>\n",
       "      <td>2</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>41</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3442.222222</td>\n",
       "      <td>1.562409e+05</td>\n",
       "      <td>2.582819e+06</td>\n",
       "      <td>0.060492</td>\n",
       "      <td>13.500</td>\n",
       "      <td>8.640506e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716340</th>\n",
       "      <td>234114</td>\n",
       "      <td>5055386</td>\n",
       "      <td>12</td>\n",
       "      <td>2</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>26</td>\n",
       "      <td>0.416667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>57.400000</td>\n",
       "      <td>3.910005e+05</td>\n",
       "      <td>2.590078e+06</td>\n",
       "      <td>0.150961</td>\n",
       "      <td>27.000</td>\n",
       "      <td>6.905362e-05</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>29620 rows × 16 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         SK_ID_CURR  SK_ID_BUREAU  BUREAU_LOAN_COUNT  BUREAU_LOAN_TYPES  \\\n",
       "365          282297       5714943                 11                  3   \n",
       "366          282297       5714944                 11                  3   \n",
       "367          282297       5714945                 11                  3   \n",
       "368          282297       5714947                 11                  3   \n",
       "369          282297       5714948                 11                  3   \n",
       "370          282297       5714952                 11                  3   \n",
       "371          282297       5714953                 11                  3   \n",
       "372          282297       5714954                 11                  3   \n",
       "782          408647       5715465                  5                  1   \n",
       "783          408647       5715466                  5                  1   \n",
       "784          408647       5715467                  5                  1   \n",
       "785          408647       5715468                  5                  1   \n",
       "786          408647       5715469                  5                  1   \n",
       "936          380677       5715645                 10                  2   \n",
       "937          380677       5715647                 10                  2   \n",
       "938          380677       5715648                 10                  2   \n",
       "939          380677       5715649                 10                  2   \n",
       "940          380677       5715650                 10                  2   \n",
       "941          380677       5715651                 10                  2   \n",
       "942          380677       5715652                 10                  2   \n",
       "1575         218135       5716400                  5                  1   \n",
       "1576         218135       5716401                  5                  1   \n",
       "1577         218135       5716403                  5                  1   \n",
       "1578         218135       5716404                  5                  1   \n",
       "1788         229323       5716668                  5                  1   \n",
       "1789         229323       5716669                  5                  1   \n",
       "1790         229323       5716670                  5                  1   \n",
       "1791         229323       5716671                  5                  1   \n",
       "1792         229323       5716672                  5                  1   \n",
       "1846         295460       5716740                  3                  2   \n",
       "...             ...           ...                ...                ...   \n",
       "1714825      139770       5094158                 18                  2   \n",
       "1714826      139770       5094164                 18                  2   \n",
       "1714872      191765       5104468                  6                  2   \n",
       "1714873      191765       5104470                  6                  2   \n",
       "1714901      139563       5104705                 12                  2   \n",
       "1714902      139563       5104709                 12                  2   \n",
       "1715016      349836       5073893                  3                  1   \n",
       "1715129      380522       5088112                  5                  3   \n",
       "1715200      423934       5094674                 12                  2   \n",
       "1715201      423934       5094678                 12                  2   \n",
       "1715301      175214       5044936                  8                  3   \n",
       "1715320      410990       5046342                 13                  2   \n",
       "1715448      102875       5052787                 15                  3   \n",
       "1715449      102875       5052790                 15                  3   \n",
       "1715450      102875       5052792                 15                  3   \n",
       "1715462      191065       5052946                 13                  3   \n",
       "1715463      191065       5052948                 13                  3   \n",
       "1715626      225755       5045159                  9                  2   \n",
       "1715627      225755       5045160                  9                  2   \n",
       "1715628      225755       5045164                  9                  2   \n",
       "1715629      225755       5045165                  9                  2   \n",
       "1715871      169437       5054640                  4                  2   \n",
       "1715938      405928       5056854                 12                  2   \n",
       "1715952      433357       5057006                 14                  2   \n",
       "1715953      433357       5057010                 14                  2   \n",
       "1715954      433357       5057011                 14                  2   \n",
       "1716016      363517       5043757                  6                  1   \n",
       "1716215      379272       5051674                 18                  2   \n",
       "1716216      379272       5051677                 18                  2   \n",
       "1716340      234114       5055386                 12                  2   \n",
       "\n",
       "         AVERAGE_LOAN_TYPE  ACTIVE_LOANS_PERCENTAGE  DAYS_DIFF  \\\n",
       "365               3.666667                 0.454545         98   \n",
       "366               3.666667                 0.454545        370   \n",
       "367               3.666667                 0.454545        118   \n",
       "368               3.666667                 0.454545        261   \n",
       "369               3.666667                 0.454545        109   \n",
       "370               3.666667                 0.454545        817   \n",
       "371               3.666667                 0.454545        273   \n",
       "372               3.666667                 0.454545          0   \n",
       "782               5.000000                 0.600000        160   \n",
       "783               5.000000                 0.600000       1042   \n",
       "784               5.000000                 0.600000        602   \n",
       "785               5.000000                 0.600000          0   \n",
       "786               5.000000                 0.600000        248   \n",
       "936               5.000000                 0.600000       1523   \n",
       "937               5.000000                 0.600000          1   \n",
       "938               5.000000                 0.600000          0   \n",
       "939               5.000000                 0.600000         46   \n",
       "940               5.000000                 0.600000        392   \n",
       "941               5.000000                 0.600000        337   \n",
       "942               5.000000                 0.600000          0   \n",
       "1575              5.000000                 0.400000        214   \n",
       "1576              5.000000                 0.400000       1635   \n",
       "1577              5.000000                 0.400000        181   \n",
       "1578              5.000000                 0.400000          0   \n",
       "1788              5.000000                 0.400000          1   \n",
       "1789              5.000000                 0.400000          0   \n",
       "1790              5.000000                 0.400000         10   \n",
       "1791              5.000000                 0.400000          4   \n",
       "1792              5.000000                 0.400000        197   \n",
       "1846              1.500000                 1.000000          0   \n",
       "...                    ...                      ...        ...   \n",
       "1714825           9.000000                 0.055556        173   \n",
       "1714826           9.000000                 0.055556          0   \n",
       "1714872           3.000000                 0.333333          0   \n",
       "1714873           3.000000                 0.333333          0   \n",
       "1714901           6.000000                 0.250000        601   \n",
       "1714902           6.000000                 0.250000          0   \n",
       "1715016           3.000000                 0.333333         98   \n",
       "1715129           1.666667                 0.800000          0   \n",
       "1715200           6.000000                 0.583333        303   \n",
       "1715201           6.000000                 0.583333        235   \n",
       "1715301           2.666667                 0.500000        288   \n",
       "1715320           6.500000                 0.307692         57   \n",
       "1715448           5.000000                 0.400000        102   \n",
       "1715449           5.000000                 0.400000         38   \n",
       "1715450           5.000000                 0.400000          0   \n",
       "1715462           4.333333                 0.230769        245   \n",
       "1715463           4.333333                 0.230769        445   \n",
       "1715626           4.500000                 0.444444          0   \n",
       "1715627           4.500000                 0.444444        261   \n",
       "1715628           4.500000                 0.444444        327   \n",
       "1715629           4.500000                 0.444444          0   \n",
       "1715871           2.000000                 0.750000          3   \n",
       "1715938           6.000000                 0.333333        510   \n",
       "1715952           7.000000                 0.642857         32   \n",
       "1715953           7.000000                 0.642857          0   \n",
       "1715954           7.000000                 0.642857          0   \n",
       "1716016           6.000000                 0.166667        433   \n",
       "1716215           9.000000                 0.444444          9   \n",
       "1716216           9.000000                 0.444444         41   \n",
       "1716340           6.000000                 0.333333         26   \n",
       "\n",
       "         CREDIT_ENDDATE_PERCENTAGE  DAYS_ENDDATE_DIFF  AVG_ENDDATE_FUTURE  \\\n",
       "365                       0.272727                NaN          190.000000   \n",
       "366                       0.272727                NaN          190.000000   \n",
       "367                       0.272727                NaN          190.000000   \n",
       "368                       0.272727              313.0          190.000000   \n",
       "369                       0.272727              257.0          190.000000   \n",
       "370                       0.272727                NaN          190.000000   \n",
       "371                       0.272727                NaN          190.000000   \n",
       "372                       0.272727                0.0          190.000000   \n",
       "782                       0.600000                NaN          344.000000   \n",
       "783                       0.600000                NaN          344.000000   \n",
       "784                       0.600000              271.0          344.000000   \n",
       "785                       0.600000                0.0          344.000000   \n",
       "786                       0.600000              761.0          344.000000   \n",
       "936                       0.500000                NaN          190.800000   \n",
       "937                       0.500000                NaN          190.800000   \n",
       "938                       0.500000                NaN          190.800000   \n",
       "939                       0.500000              894.0          190.800000   \n",
       "940                       0.500000                NaN          190.800000   \n",
       "941                       0.500000                0.0          190.800000   \n",
       "942                       0.500000                0.0          190.800000   \n",
       "1575                      0.000000                NaN                 NaN   \n",
       "1576                      0.000000                NaN                 NaN   \n",
       "1577                      0.000000                NaN                 NaN   \n",
       "1578                      0.000000                NaN                 NaN   \n",
       "1788                      0.400000                NaN            0.000000   \n",
       "1789                      0.400000                0.0            0.000000   \n",
       "1790                      0.400000                NaN            0.000000   \n",
       "1791                      0.400000                0.0            0.000000   \n",
       "1792                      0.400000                NaN            0.000000   \n",
       "1846                      0.333333                0.0            0.000000   \n",
       "...                            ...                ...                 ...   \n",
       "1714825                   0.333333                NaN         5017.166667   \n",
       "1714826                   0.333333                0.0         5017.166667   \n",
       "1714872                   0.500000                0.0        10236.666667   \n",
       "1714873                   0.500000                NaN        10236.666667   \n",
       "1714901                   0.166667                NaN          145.000000   \n",
       "1714902                   0.166667                NaN          145.000000   \n",
       "1715016                   0.333333                NaN            0.000000   \n",
       "1715129                   0.800000                0.0         1442.750000   \n",
       "1715200                   0.500000              201.0          127.000000   \n",
       "1715201                   0.500000                NaN          127.000000   \n",
       "1715301                   0.625000               60.0          903.800000   \n",
       "1715320                   0.307692                NaN         7743.250000   \n",
       "1715448                   0.333333               15.0         1203.000000   \n",
       "1715449                   0.333333                NaN         1203.000000   \n",
       "1715450                   0.333333                NaN         1203.000000   \n",
       "1715462                   0.307692                NaN         7710.250000   \n",
       "1715463                   0.307692                NaN         7710.250000   \n",
       "1715626                   0.555556              130.0          275.800000   \n",
       "1715627                   0.555556                0.0          275.800000   \n",
       "1715628                   0.555556                NaN          275.800000   \n",
       "1715629                   0.555556                NaN          275.800000   \n",
       "1715871                   0.500000                0.0           35.000000   \n",
       "1715938                   0.166667                NaN           92.500000   \n",
       "1715952                   0.785714               31.0          132.272727   \n",
       "1715953                   0.785714              282.0          132.272727   \n",
       "1715954                   0.785714              118.0          132.272727   \n",
       "1716016                   0.166667                NaN            0.000000   \n",
       "1716215                   0.500000                0.0         3442.222222   \n",
       "1716216                   0.500000                NaN         3442.222222   \n",
       "1716340                   0.416667                NaN           57.400000   \n",
       "\n",
       "         TOTAL_CUSTOMER_DEBT  TOTAL_CUSTOMER_CREDIT  DEBT_CREDIT_RATIO  \\\n",
       "365             6.294134e+05           3.693748e+06           0.170400   \n",
       "366             6.294134e+05           3.693748e+06           0.170400   \n",
       "367             6.294134e+05           3.693748e+06           0.170400   \n",
       "368             6.294134e+05           3.693748e+06           0.170400   \n",
       "369             6.294134e+05           3.693748e+06           0.170400   \n",
       "370             6.294134e+05           3.693748e+06           0.170400   \n",
       "371             6.294134e+05           3.693748e+06           0.170400   \n",
       "372             6.294134e+05           3.693748e+06           0.170400   \n",
       "782             1.088064e+06           2.495084e+06           0.436083   \n",
       "783             1.088064e+06           2.495084e+06           0.436083   \n",
       "784             1.088064e+06           2.495084e+06           0.436083   \n",
       "785             1.088064e+06           2.495084e+06           0.436083   \n",
       "786             1.088064e+06           2.495084e+06           0.436083   \n",
       "936             6.844095e+05           1.214273e+06           0.563637   \n",
       "937             6.844095e+05           1.214273e+06           0.563637   \n",
       "938             6.844095e+05           1.214273e+06           0.563637   \n",
       "939             6.844095e+05           1.214273e+06           0.563637   \n",
       "940             6.844095e+05           1.214273e+06           0.563637   \n",
       "941             6.844095e+05           1.214273e+06           0.563637   \n",
       "942             6.844095e+05           1.214273e+06           0.563637   \n",
       "1575            0.000000e+00           3.375000e+05           0.000000   \n",
       "1576            0.000000e+00           3.375000e+05           0.000000   \n",
       "1577            0.000000e+00           3.375000e+05           0.000000   \n",
       "1578            0.000000e+00           3.375000e+05           0.000000   \n",
       "1788            5.583465e+05           1.224909e+06           0.455827   \n",
       "1789            5.583465e+05           1.224909e+06           0.455827   \n",
       "1790            5.583465e+05           1.224909e+06           0.455827   \n",
       "1791            5.583465e+05           1.224909e+06           0.455827   \n",
       "1792            5.583465e+05           1.224909e+06           0.455827   \n",
       "1846            0.000000e+00           8.545500e+05           0.000000   \n",
       "...                      ...                    ...                ...   \n",
       "1714825         5.225400e+04           1.847503e+06           0.028284   \n",
       "1714826         5.225400e+04           1.847503e+06           0.028284   \n",
       "1714872         1.112310e+05           9.207360e+05           0.120807   \n",
       "1714873         1.112310e+05           9.207360e+05           0.120807   \n",
       "1714901         3.940452e+05           1.446845e+06           0.272348   \n",
       "1714902         3.940452e+05           1.446845e+06           0.272348   \n",
       "1715016         1.240695e+05           3.703185e+05           0.335035   \n",
       "1715129         3.593038e+06           6.256875e+06           0.574255   \n",
       "1715200         9.462870e+05           2.489296e+06           0.380142   \n",
       "1715201         9.462870e+05           2.489296e+06           0.380142   \n",
       "1715301         1.615600e+07           2.374575e+07           0.680375   \n",
       "1715320         3.748647e+05           3.131539e+06           0.119706   \n",
       "1715448         2.951487e+06           7.484517e+06           0.394346   \n",
       "1715449         2.951487e+06           7.484517e+06           0.394346   \n",
       "1715450         2.951487e+06           7.484517e+06           0.394346   \n",
       "1715462         2.842650e+05           3.540578e+06           0.080288   \n",
       "1715463         2.842650e+05           3.540578e+06           0.080288   \n",
       "1715626         1.676498e+06           4.330048e+06           0.387178   \n",
       "1715627         1.676498e+06           4.330048e+06           0.387178   \n",
       "1715628         1.676498e+06           4.330048e+06           0.387178   \n",
       "1715629         1.676498e+06           4.330048e+06           0.387178   \n",
       "1715871         2.259585e+05           3.092175e+05           0.730743   \n",
       "1715938         3.219424e+05           1.794085e+06           0.179447   \n",
       "1715952         1.043053e+06           2.383956e+06           0.437530   \n",
       "1715953         1.043053e+06           2.383956e+06           0.437530   \n",
       "1715954         1.043053e+06           2.383956e+06           0.437530   \n",
       "1716016         1.197405e+05           2.029529e+06           0.058999   \n",
       "1716215         1.562409e+05           2.582819e+06           0.060492   \n",
       "1716216         1.562409e+05           2.582819e+06           0.060492   \n",
       "1716340         3.910005e+05           2.590078e+06           0.150961   \n",
       "\n",
       "         TOTAL_CUSTOMER_OVERDUE  OVERDUE_DEBT_RATIO  AVG_CREDITDAYS_PROLONGED  \n",
       "365                     231.525        3.678425e-04                  0.000000  \n",
       "366                     231.525        3.678425e-04                  0.000000  \n",
       "367                     231.525        3.678425e-04                  0.000000  \n",
       "368                     231.525        3.678425e-04                  0.000000  \n",
       "369                     231.525        3.678425e-04                  0.000000  \n",
       "370                     231.525        3.678425e-04                  0.000000  \n",
       "371                     231.525        3.678425e-04                  0.000000  \n",
       "372                     231.525        3.678425e-04                  0.000000  \n",
       "782                     288.000        2.646903e-04                  0.000000  \n",
       "783                     288.000        2.646903e-04                  0.000000  \n",
       "784                     288.000        2.646903e-04                  0.000000  \n",
       "785                     288.000        2.646903e-04                  0.000000  \n",
       "786                     288.000        2.646903e-04                  0.000000  \n",
       "936                      58.500        8.547514e-05                  0.000000  \n",
       "937                      58.500        8.547514e-05                  0.000000  \n",
       "938                      58.500        8.547514e-05                  0.000000  \n",
       "939                      58.500        8.547514e-05                  0.000000  \n",
       "940                      58.500        8.547514e-05                  0.000000  \n",
       "941                      58.500        8.547514e-05                  0.000000  \n",
       "942                      58.500        8.547514e-05                  0.000000  \n",
       "1575                    504.000                 inf                  0.000000  \n",
       "1576                    504.000                 inf                  0.000000  \n",
       "1577                    504.000                 inf                  0.000000  \n",
       "1578                    504.000                 inf                  0.000000  \n",
       "1788                 169582.500        3.037227e-01                  0.000000  \n",
       "1789                 169582.500        3.037227e-01                  0.000000  \n",
       "1790                 169582.500        3.037227e-01                  0.000000  \n",
       "1791                 169582.500        3.037227e-01                  0.000000  \n",
       "1792                 169582.500        3.037227e-01                  0.000000  \n",
       "1846                    576.000                 inf                  0.000000  \n",
       "...                         ...                 ...                       ...  \n",
       "1714825                 783.000        1.498450e-02                  0.000000  \n",
       "1714826                 783.000        1.498450e-02                  0.000000  \n",
       "1714872                   4.500        4.045635e-05                  0.166667  \n",
       "1714873                   4.500        4.045635e-05                  0.166667  \n",
       "1714901                   9.000        2.284002e-05                  0.000000  \n",
       "1714902                   9.000        2.284002e-05                  0.000000  \n",
       "1715016                   4.500        3.626999e-05                  0.000000  \n",
       "1715129                 220.500        6.136867e-05                  0.000000  \n",
       "1715200               16645.500        1.759033e-02                  0.000000  \n",
       "1715201               16645.500        1.759033e-02                  0.000000  \n",
       "1715301                   9.000        5.570685e-07                  0.000000  \n",
       "1715320                  36.000        9.603466e-05                  0.000000  \n",
       "1715448                  36.000        1.219724e-05                  0.000000  \n",
       "1715449                  36.000        1.219724e-05                  0.000000  \n",
       "1715450                  36.000        1.219724e-05                  0.000000  \n",
       "1715462                9085.500        3.196137e-02                  0.000000  \n",
       "1715463                9085.500        3.196137e-02                  0.000000  \n",
       "1715626              131832.000        7.863537e-02                  0.000000  \n",
       "1715627              131832.000        7.863537e-02                  0.000000  \n",
       "1715628              131832.000        7.863537e-02                  0.000000  \n",
       "1715629              131832.000        7.863537e-02                  0.000000  \n",
       "1715871                 760.500        3.365662e-03                  0.000000  \n",
       "1715938               12817.710        3.981367e-02                  0.083333  \n",
       "1715952                 873.000        8.369664e-04                  0.000000  \n",
       "1715953                 873.000        8.369664e-04                  0.000000  \n",
       "1715954                 873.000        8.369664e-04                  0.000000  \n",
       "1716016                  99.000        8.267879e-04                  0.000000  \n",
       "1716215                  13.500        8.640506e-05                  0.000000  \n",
       "1716216                  13.500        8.640506e-05                  0.000000  \n",
       "1716340                  27.000        6.905362e-05                  0.000000  \n",
       "\n",
       "[29620 rows x 16 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.TOTAL_CUSTOMER_OVERDUE > 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>MIN_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MAX_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MEAN_DAYS_ENDDATE_DIFF</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100001</td>\n",
       "      <td>0.0</td>\n",
       "      <td>876.0</td>\n",
       "      <td>455.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100002</td>\n",
       "      <td>0.0</td>\n",
       "      <td>695.0</td>\n",
       "      <td>143.600000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100003</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100004</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100005</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>601.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>100007</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>100008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>100009</td>\n",
       "      <td>0.0</td>\n",
       "      <td>905.0</td>\n",
       "      <td>252.600000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>100010</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>100011</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>100013</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>100014</td>\n",
       "      <td>0.0</td>\n",
       "      <td>659.0</td>\n",
       "      <td>226.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>100015</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>100016</td>\n",
       "      <td>0.0</td>\n",
       "      <td>609.0</td>\n",
       "      <td>155.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>100017</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>100019</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10044.0</td>\n",
       "      <td>5022.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>100020</td>\n",
       "      <td>0.0</td>\n",
       "      <td>269.0</td>\n",
       "      <td>134.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>100022</td>\n",
       "      <td>0.0</td>\n",
       "      <td>998.0</td>\n",
       "      <td>499.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>100023</td>\n",
       "      <td>0.0</td>\n",
       "      <td>713.0</td>\n",
       "      <td>321.800000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>100025</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>100026</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1364.0</td>\n",
       "      <td>454.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>100027</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>100028</td>\n",
       "      <td>0.0</td>\n",
       "      <td>29950.0</td>\n",
       "      <td>6021.800000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>100029</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>100030</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1171.0</td>\n",
       "      <td>390.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>100031</td>\n",
       "      <td>0.0</td>\n",
       "      <td>491.0</td>\n",
       "      <td>143.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>100032</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>100033</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>100035</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8564.0</td>\n",
       "      <td>2358.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>100036</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305781</th>\n",
       "      <td>456220</td>\n",
       "      <td>0.0</td>\n",
       "      <td>26106.0</td>\n",
       "      <td>13053.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305782</th>\n",
       "      <td>456221</td>\n",
       "      <td>0.0</td>\n",
       "      <td>298.0</td>\n",
       "      <td>149.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305783</th>\n",
       "      <td>456223</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305784</th>\n",
       "      <td>456224</td>\n",
       "      <td>0.0</td>\n",
       "      <td>189.0</td>\n",
       "      <td>75.600000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305785</th>\n",
       "      <td>456225</td>\n",
       "      <td>0.0</td>\n",
       "      <td>720.0</td>\n",
       "      <td>144.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305786</th>\n",
       "      <td>456226</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305787</th>\n",
       "      <td>456227</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305788</th>\n",
       "      <td>456229</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305789</th>\n",
       "      <td>456230</td>\n",
       "      <td>0.0</td>\n",
       "      <td>26714.0</td>\n",
       "      <td>5345.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305790</th>\n",
       "      <td>456231</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1220.0</td>\n",
       "      <td>450.200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305791</th>\n",
       "      <td>456232</td>\n",
       "      <td>0.0</td>\n",
       "      <td>142.0</td>\n",
       "      <td>71.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305792</th>\n",
       "      <td>456233</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305793</th>\n",
       "      <td>456234</td>\n",
       "      <td>0.0</td>\n",
       "      <td>180.0</td>\n",
       "      <td>90.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305794</th>\n",
       "      <td>456235</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305795</th>\n",
       "      <td>456236</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8839.0</td>\n",
       "      <td>1929.200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305796</th>\n",
       "      <td>456237</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305797</th>\n",
       "      <td>456238</td>\n",
       "      <td>0.0</td>\n",
       "      <td>37.0</td>\n",
       "      <td>18.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305798</th>\n",
       "      <td>456239</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8663.0</td>\n",
       "      <td>2477.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305799</th>\n",
       "      <td>456240</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305800</th>\n",
       "      <td>456241</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305801</th>\n",
       "      <td>456242</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305802</th>\n",
       "      <td>456243</td>\n",
       "      <td>0.0</td>\n",
       "      <td>350.0</td>\n",
       "      <td>87.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305803</th>\n",
       "      <td>456244</td>\n",
       "      <td>0.0</td>\n",
       "      <td>368.0</td>\n",
       "      <td>148.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305804</th>\n",
       "      <td>456246</td>\n",
       "      <td>0.0</td>\n",
       "      <td>814.0</td>\n",
       "      <td>407.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305805</th>\n",
       "      <td>456247</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8736.0</td>\n",
       "      <td>2289.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305806</th>\n",
       "      <td>456249</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305807</th>\n",
       "      <td>456250</td>\n",
       "      <td>0.0</td>\n",
       "      <td>543.0</td>\n",
       "      <td>271.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305808</th>\n",
       "      <td>456253</td>\n",
       "      <td>0.0</td>\n",
       "      <td>726.0</td>\n",
       "      <td>363.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305809</th>\n",
       "      <td>456254</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>305810</th>\n",
       "      <td>456255</td>\n",
       "      <td>0.0</td>\n",
       "      <td>18700.0</td>\n",
       "      <td>3863.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>305811 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  MIN_DAYS_ENDDATE_DIFF  MAX_DAYS_ENDDATE_DIFF  \\\n",
       "0           100001                    0.0                  876.0   \n",
       "1           100002                    0.0                  695.0   \n",
       "2           100003                    0.0                    0.0   \n",
       "3           100004                    NaN                    NaN   \n",
       "4           100005                    0.0                 1202.0   \n",
       "5           100007                    NaN                    NaN   \n",
       "6           100008                    0.0                    0.0   \n",
       "7           100009                    0.0                  905.0   \n",
       "8           100010                    0.0                    0.0   \n",
       "9           100011                    NaN                    NaN   \n",
       "10          100013                    NaN                    NaN   \n",
       "11          100014                    0.0                  659.0   \n",
       "12          100015                    NaN                    NaN   \n",
       "13          100016                    0.0                  609.0   \n",
       "14          100017                    0.0                    0.0   \n",
       "15          100019                    0.0                10044.0   \n",
       "16          100020                    0.0                  269.0   \n",
       "17          100022                    0.0                  998.0   \n",
       "18          100023                    0.0                  713.0   \n",
       "19          100025                    0.0                    0.0   \n",
       "20          100026                    0.0                 1364.0   \n",
       "21          100027                    0.0                    0.0   \n",
       "22          100028                    0.0                29950.0   \n",
       "23          100029                    0.0                    0.0   \n",
       "24          100030                    0.0                 1171.0   \n",
       "25          100031                    0.0                  491.0   \n",
       "26          100032                    NaN                    NaN   \n",
       "27          100033                    0.0                    0.0   \n",
       "28          100035                    0.0                 8564.0   \n",
       "29          100036                    NaN                    NaN   \n",
       "...            ...                    ...                    ...   \n",
       "305781      456220                    0.0                26106.0   \n",
       "305782      456221                    0.0                  298.0   \n",
       "305783      456223                    0.0                    0.0   \n",
       "305784      456224                    0.0                  189.0   \n",
       "305785      456225                    0.0                  720.0   \n",
       "305786      456226                    0.0                    0.0   \n",
       "305787      456227                    0.0                    0.0   \n",
       "305788      456229                    0.0                    0.0   \n",
       "305789      456230                    0.0                26714.0   \n",
       "305790      456231                    0.0                 1220.0   \n",
       "305791      456232                    0.0                  142.0   \n",
       "305792      456233                    0.0                    0.0   \n",
       "305793      456234                    0.0                  180.0   \n",
       "305794      456235                    0.0                    0.0   \n",
       "305795      456236                    0.0                 8839.0   \n",
       "305796      456237                    NaN                    NaN   \n",
       "305797      456238                    0.0                   37.0   \n",
       "305798      456239                    0.0                 8663.0   \n",
       "305799      456240                    0.0                    0.0   \n",
       "305800      456241                    0.0                    0.0   \n",
       "305801      456242                    0.0                    0.0   \n",
       "305802      456243                    0.0                  350.0   \n",
       "305803      456244                    0.0                  368.0   \n",
       "305804      456246                    0.0                  814.0   \n",
       "305805      456247                    0.0                 8736.0   \n",
       "305806      456249                    0.0                    0.0   \n",
       "305807      456250                    0.0                  543.0   \n",
       "305808      456253                    0.0                  726.0   \n",
       "305809      456254                    NaN                    NaN   \n",
       "305810      456255                    0.0                18700.0   \n",
       "\n",
       "        MEAN_DAYS_ENDDATE_DIFF  \n",
       "0                   455.666667  \n",
       "1                   143.600000  \n",
       "2                     0.000000  \n",
       "3                          NaN  \n",
       "4                   601.000000  \n",
       "5                          NaN  \n",
       "6                     0.000000  \n",
       "7                   252.600000  \n",
       "8                     0.000000  \n",
       "9                          NaN  \n",
       "10                         NaN  \n",
       "11                  226.000000  \n",
       "12                         NaN  \n",
       "13                  155.500000  \n",
       "14                    0.000000  \n",
       "15                 5022.000000  \n",
       "16                  134.500000  \n",
       "17                  499.000000  \n",
       "18                  321.800000  \n",
       "19                    0.000000  \n",
       "20                  454.666667  \n",
       "21                    0.000000  \n",
       "22                 6021.800000  \n",
       "23                    0.000000  \n",
       "24                  390.333333  \n",
       "25                  143.166667  \n",
       "26                         NaN  \n",
       "27                    0.000000  \n",
       "28                 2358.500000  \n",
       "29                         NaN  \n",
       "...                        ...  \n",
       "305781            13053.000000  \n",
       "305782              149.000000  \n",
       "305783                0.000000  \n",
       "305784               75.600000  \n",
       "305785              144.000000  \n",
       "305786                0.000000  \n",
       "305787                0.000000  \n",
       "305788                0.000000  \n",
       "305789             5345.000000  \n",
       "305790              450.200000  \n",
       "305791               71.000000  \n",
       "305792                0.000000  \n",
       "305793               90.000000  \n",
       "305794                0.000000  \n",
       "305795             1929.200000  \n",
       "305796                     NaN  \n",
       "305797               18.500000  \n",
       "305798             2477.000000  \n",
       "305799                0.000000  \n",
       "305800                0.000000  \n",
       "305801                0.000000  \n",
       "305802               87.500000  \n",
       "305803              148.166667  \n",
       "305804              407.000000  \n",
       "305805             2289.750000  \n",
       "305806                0.000000  \n",
       "305807              271.500000  \n",
       "305808              363.000000  \n",
       "305809                     NaN  \n",
       "305810             3863.000000  \n",
       "\n",
       "[305811 rows x 4 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = bureau_full_df\n",
    "#grp = df.groupby(by=['SK_ID_CURR'])['DAYS_ENDDATE_DIFF'].mean().reset_index().rename(index=str, columns={\n",
    "#    feature_name: 'AVERAGE_%s' % feature_name.upper()})\n",
    "\n",
    "agg_func = ['min', 'max', 'mean']\n",
    "feature_name = 'DAYS_ENDDATE_DIFF'\n",
    "\n",
    "columns = {}\n",
    "for f in agg_func:\n",
    "    columns[f] = f.upper() + '_' + feature_name\n",
    "\n",
    "grp = df.groupby(by=['SK_ID_CURR'])[feature_name].agg(agg_func)\n",
    "grp.reset_index().rename(index=str, columns=columns)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['Consumer credit', 'Credit card', 'Mortgage', 'Car loan',\n",
       "       'Microloan', 'Loan for working capital replenishment',\n",
       "       'Loan for business development', 'Real estate loan'], dtype=object)"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df['CREDIT_TYPE'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "with open('dataset/bureau_full.pkl', 'wb') as handle:\n",
    "    model_predicts = pickle.dump(bureau_full_df, handle)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### NOTAS\n",
    "> * Numeros negativos em datas (Ex.: DAYS_CREDIT, DAYS_CREDIT_ENDDATE etc.) significam que e no passado e positivos no futuro\n",
    "\n",
    "### TODO:\n",
    "> Ao verificar o mesmo cliente, podemos identificar que o mesmo pode estar registrado em diversos \"escritórios\" diferentes. \n",
    "> Isso pode gerar uma série de features interessantes:\n",
    "> * OK: Quantos créditos já foram pedidos por este cliente?\n",
    "> * OK: Gerar features baseados no numero de itens para cada cliente no CREDIT_ACTIVE\n",
    "> * OK: Qual o tempo entre um emprestimo e outro?\n",
    "> * OK: Qual o tempo médio entre um emprestimo e outro?\n",
    "> * OK: Numero total de dias do emprestimo e tempo médio de emprestimos realizados\n",
    "> * Existem dois ou mais pedidos de empréstimo ao mesmo tempo?\n",
    "> * Existem créditos atrasados (CREDIT_DAY_OVERDUE)?\n",
    ">   * Quantos creditos estao atrasados?\n",
    "> * Quantos creditos ativos e nao ativos de cada tipo (CREDIT_TYPE) foram abertos?\n",
    "> * Qual a porcentagem ja foi paga do credito (DAYS_CREDIT_ENDDATE e DAYS_CREDIT depois normalizar)\n",
    "> * Qual a taxa de inadimplencia por SK_ID_BUREAU?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Quantos créditos já foram pedidos por este cliente?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>353</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>354</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>343</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>355</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>28</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>356</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>131</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>357</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>299</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>358</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>123</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>359</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714529</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-672</td>\n",
       "      <td>0</td>\n",
       "      <td>10285.0</td>\n",
       "      <td>-531.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>51</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>343</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>28</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>131</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>299</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>365</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>123</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>366</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714530</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1304</td>\n",
       "      <td>0</td>\n",
       "      <td>1253.0</td>\n",
       "      <td>-1287.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>51</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>374</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>375</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>343</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>376</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>28</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>377</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>131</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>378</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>299</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>379</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>123</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>380</th>\n",
       "      <td>389599</td>\n",
       "      <td>5714532</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1130</td>\n",
       "      <td>0</td>\n",
       "      <td>331.0</td>\n",
       "      <td>-858.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-847</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>51</td>\n",
       "      <td>139.285714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>729</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>730</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>123</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>731</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>296</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>732</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>204</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>733</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>734</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>158</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>735</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>86</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>736</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>202</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>737</th>\n",
       "      <td>119939</td>\n",
       "      <td>5714573</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1188</td>\n",
       "      <td>0</td>\n",
       "      <td>1369.0</td>\n",
       "      <td>-1090.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-429</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>122.764706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2918</th>\n",
       "      <td>132745</td>\n",
       "      <td>5714974</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-224</td>\n",
       "      <td>0</td>\n",
       "      <td>141.0</td>\n",
       "      <td>-193.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>113040.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-190</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1450</td>\n",
       "      <td>641.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2919</th>\n",
       "      <td>132745</td>\n",
       "      <td>5714974</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-224</td>\n",
       "      <td>0</td>\n",
       "      <td>141.0</td>\n",
       "      <td>-193.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>113040.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-190</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>100</td>\n",
       "      <td>641.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2926</th>\n",
       "      <td>221368</td>\n",
       "      <td>5714982</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-249</td>\n",
       "      <td>0</td>\n",
       "      <td>116.0</td>\n",
       "      <td>-189.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>111825.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-189</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>92.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2927</th>\n",
       "      <td>221368</td>\n",
       "      <td>5714982</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-249</td>\n",
       "      <td>0</td>\n",
       "      <td>116.0</td>\n",
       "      <td>-189.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>111825.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-189</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>185</td>\n",
       "      <td>92.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3234</th>\n",
       "      <td>317276</td>\n",
       "      <td>5715016</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1050</td>\n",
       "      <td>0</td>\n",
       "      <td>777.0</td>\n",
       "      <td>-445.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>427500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-422</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>211.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3235</th>\n",
       "      <td>317276</td>\n",
       "      <td>5715016</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1050</td>\n",
       "      <td>0</td>\n",
       "      <td>777.0</td>\n",
       "      <td>-445.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>427500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-422</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>264</td>\n",
       "      <td>211.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3236</th>\n",
       "      <td>317276</td>\n",
       "      <td>5715016</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1050</td>\n",
       "      <td>0</td>\n",
       "      <td>777.0</td>\n",
       "      <td>-445.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>427500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-422</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>369</td>\n",
       "      <td>211.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3288</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3289</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>91</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3290</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>74</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3291</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>115</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3292</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>250</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3293</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>34</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3294</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>585</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3295</th>\n",
       "      <td>115001</td>\n",
       "      <td>5715028</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-265</td>\n",
       "      <td>0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>-174.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-168</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1461</td>\n",
       "      <td>326.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3512</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3513</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>429</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3514</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1412</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3515</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>329</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3516</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>121</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3517</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>61</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3518</th>\n",
       "      <td>432545</td>\n",
       "      <td>5715064</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2371</td>\n",
       "      <td>0</td>\n",
       "      <td>31111.0</td>\n",
       "      <td>-2128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-555</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>336.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3675</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3676</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>112</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3677</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>173</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3678</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3679</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>47</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3680</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>290</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3681</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3682</th>\n",
       "      <td>388014</td>\n",
       "      <td>5715090</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-71</td>\n",
       "      <td>0</td>\n",
       "      <td>113.0</td>\n",
       "      <td>-10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>57060.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>363</td>\n",
       "      <td>127.250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>293 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "353       389599       5714529        Closed      currency 1         -672   \n",
       "354       389599       5714529        Closed      currency 1         -672   \n",
       "355       389599       5714529        Closed      currency 1         -672   \n",
       "356       389599       5714529        Closed      currency 1         -672   \n",
       "357       389599       5714529        Closed      currency 1         -672   \n",
       "358       389599       5714529        Closed      currency 1         -672   \n",
       "359       389599       5714529        Closed      currency 1         -672   \n",
       "360       389599       5714530        Closed      currency 1        -1304   \n",
       "361       389599       5714530        Closed      currency 1        -1304   \n",
       "362       389599       5714530        Closed      currency 1        -1304   \n",
       "363       389599       5714530        Closed      currency 1        -1304   \n",
       "364       389599       5714530        Closed      currency 1        -1304   \n",
       "365       389599       5714530        Closed      currency 1        -1304   \n",
       "366       389599       5714530        Closed      currency 1        -1304   \n",
       "374       389599       5714532        Closed      currency 1        -1130   \n",
       "375       389599       5714532        Closed      currency 1        -1130   \n",
       "376       389599       5714532        Closed      currency 1        -1130   \n",
       "377       389599       5714532        Closed      currency 1        -1130   \n",
       "378       389599       5714532        Closed      currency 1        -1130   \n",
       "379       389599       5714532        Closed      currency 1        -1130   \n",
       "380       389599       5714532        Closed      currency 1        -1130   \n",
       "729       119939       5714573        Closed      currency 1        -1188   \n",
       "730       119939       5714573        Closed      currency 1        -1188   \n",
       "731       119939       5714573        Closed      currency 1        -1188   \n",
       "732       119939       5714573        Closed      currency 1        -1188   \n",
       "733       119939       5714573        Closed      currency 1        -1188   \n",
       "734       119939       5714573        Closed      currency 1        -1188   \n",
       "735       119939       5714573        Closed      currency 1        -1188   \n",
       "736       119939       5714573        Closed      currency 1        -1188   \n",
       "737       119939       5714573        Closed      currency 1        -1188   \n",
       "...          ...           ...           ...             ...          ...   \n",
       "2918      132745       5714974        Closed      currency 1         -224   \n",
       "2919      132745       5714974        Closed      currency 1         -224   \n",
       "2926      221368       5714982        Closed      currency 1         -249   \n",
       "2927      221368       5714982        Closed      currency 1         -249   \n",
       "3234      317276       5715016        Closed      currency 1        -1050   \n",
       "3235      317276       5715016        Closed      currency 1        -1050   \n",
       "3236      317276       5715016        Closed      currency 1        -1050   \n",
       "3288      115001       5715028        Closed      currency 1         -265   \n",
       "3289      115001       5715028        Closed      currency 1         -265   \n",
       "3290      115001       5715028        Closed      currency 1         -265   \n",
       "3291      115001       5715028        Closed      currency 1         -265   \n",
       "3292      115001       5715028        Closed      currency 1         -265   \n",
       "3293      115001       5715028        Closed      currency 1         -265   \n",
       "3294      115001       5715028        Closed      currency 1         -265   \n",
       "3295      115001       5715028        Closed      currency 1         -265   \n",
       "3512      432545       5715064        Closed      currency 1        -2371   \n",
       "3513      432545       5715064        Closed      currency 1        -2371   \n",
       "3514      432545       5715064        Closed      currency 1        -2371   \n",
       "3515      432545       5715064        Closed      currency 1        -2371   \n",
       "3516      432545       5715064        Closed      currency 1        -2371   \n",
       "3517      432545       5715064        Closed      currency 1        -2371   \n",
       "3518      432545       5715064        Closed      currency 1        -2371   \n",
       "3675      388014       5715090        Closed      currency 1          -71   \n",
       "3676      388014       5715090        Closed      currency 1          -71   \n",
       "3677      388014       5715090        Closed      currency 1          -71   \n",
       "3678      388014       5715090        Closed      currency 1          -71   \n",
       "3679      388014       5715090        Closed      currency 1          -71   \n",
       "3680      388014       5715090        Closed      currency 1          -71   \n",
       "3681      388014       5715090        Closed      currency 1          -71   \n",
       "3682      388014       5715090        Closed      currency 1          -71   \n",
       "\n",
       "      CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "353                    0              10285.0             -531.0   \n",
       "354                    0              10285.0             -531.0   \n",
       "355                    0              10285.0             -531.0   \n",
       "356                    0              10285.0             -531.0   \n",
       "357                    0              10285.0             -531.0   \n",
       "358                    0              10285.0             -531.0   \n",
       "359                    0              10285.0             -531.0   \n",
       "360                    0               1253.0            -1287.0   \n",
       "361                    0               1253.0            -1287.0   \n",
       "362                    0               1253.0            -1287.0   \n",
       "363                    0               1253.0            -1287.0   \n",
       "364                    0               1253.0            -1287.0   \n",
       "365                    0               1253.0            -1287.0   \n",
       "366                    0               1253.0            -1287.0   \n",
       "374                    0                331.0             -858.0   \n",
       "375                    0                331.0             -858.0   \n",
       "376                    0                331.0             -858.0   \n",
       "377                    0                331.0             -858.0   \n",
       "378                    0                331.0             -858.0   \n",
       "379                    0                331.0             -858.0   \n",
       "380                    0                331.0             -858.0   \n",
       "729                    0               1369.0            -1090.0   \n",
       "730                    0               1369.0            -1090.0   \n",
       "731                    0               1369.0            -1090.0   \n",
       "732                    0               1369.0            -1090.0   \n",
       "733                    0               1369.0            -1090.0   \n",
       "734                    0               1369.0            -1090.0   \n",
       "735                    0               1369.0            -1090.0   \n",
       "736                    0               1369.0            -1090.0   \n",
       "737                    0               1369.0            -1090.0   \n",
       "...                  ...                  ...                ...   \n",
       "2918                   0                141.0             -193.0   \n",
       "2919                   0                141.0             -193.0   \n",
       "2926                   0                116.0             -189.0   \n",
       "2927                   0                116.0             -189.0   \n",
       "3234                   0                777.0             -445.0   \n",
       "3235                   0                777.0             -445.0   \n",
       "3236                   0                777.0             -445.0   \n",
       "3288                   0                100.0             -174.0   \n",
       "3289                   0                100.0             -174.0   \n",
       "3290                   0                100.0             -174.0   \n",
       "3291                   0                100.0             -174.0   \n",
       "3292                   0                100.0             -174.0   \n",
       "3293                   0                100.0             -174.0   \n",
       "3294                   0                100.0             -174.0   \n",
       "3295                   0                100.0             -174.0   \n",
       "3512                   0              31111.0            -2128.0   \n",
       "3513                   0              31111.0            -2128.0   \n",
       "3514                   0              31111.0            -2128.0   \n",
       "3515                   0              31111.0            -2128.0   \n",
       "3516                   0              31111.0            -2128.0   \n",
       "3517                   0              31111.0            -2128.0   \n",
       "3518                   0              31111.0            -2128.0   \n",
       "3675                   0                113.0              -10.0   \n",
       "3676                   0                113.0              -10.0   \n",
       "3677                   0                113.0              -10.0   \n",
       "3678                   0                113.0              -10.0   \n",
       "3679                   0                113.0              -10.0   \n",
       "3680                   0                113.0              -10.0   \n",
       "3681                   0                113.0              -10.0   \n",
       "3682                   0                113.0              -10.0   \n",
       "\n",
       "      AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "353                      NaN                   0        135000.0   \n",
       "354                      NaN                   0        135000.0   \n",
       "355                      NaN                   0        135000.0   \n",
       "356                      NaN                   0        135000.0   \n",
       "357                      NaN                   0        135000.0   \n",
       "358                      NaN                   0        135000.0   \n",
       "359                      NaN                   0        135000.0   \n",
       "360                      NaN                   0        225000.0   \n",
       "361                      NaN                   0        225000.0   \n",
       "362                      NaN                   0        225000.0   \n",
       "363                      NaN                   0        225000.0   \n",
       "364                      NaN                   0        225000.0   \n",
       "365                      NaN                   0        225000.0   \n",
       "366                      NaN                   0        225000.0   \n",
       "374                      NaN                   0        450000.0   \n",
       "375                      NaN                   0        450000.0   \n",
       "376                      NaN                   0        450000.0   \n",
       "377                      NaN                   0        450000.0   \n",
       "378                      NaN                   0        450000.0   \n",
       "379                      NaN                   0        450000.0   \n",
       "380                      NaN                   0        450000.0   \n",
       "729                      NaN                   0        450000.0   \n",
       "730                      NaN                   0        450000.0   \n",
       "731                      NaN                   0        450000.0   \n",
       "732                      NaN                   0        450000.0   \n",
       "733                      NaN                   0        450000.0   \n",
       "734                      NaN                   0        450000.0   \n",
       "735                      NaN                   0        450000.0   \n",
       "736                      NaN                   0        450000.0   \n",
       "737                      NaN                   0        450000.0   \n",
       "...                      ...                 ...             ...   \n",
       "2918                     NaN                   0        113040.0   \n",
       "2919                     NaN                   0        113040.0   \n",
       "2926                     0.0                   0        111825.0   \n",
       "2927                     0.0                   0        111825.0   \n",
       "3234                     NaN                   0        427500.0   \n",
       "3235                     NaN                   0        427500.0   \n",
       "3236                     NaN                   0        427500.0   \n",
       "3288                     NaN                   0         67500.0   \n",
       "3289                     NaN                   0         67500.0   \n",
       "3290                     NaN                   0         67500.0   \n",
       "3291                     NaN                   0         67500.0   \n",
       "3292                     NaN                   0         67500.0   \n",
       "3293                     NaN                   0         67500.0   \n",
       "3294                     NaN                   0         67500.0   \n",
       "3295                     NaN                   0         67500.0   \n",
       "3512                     NaN                   0        270000.0   \n",
       "3513                     NaN                   0        270000.0   \n",
       "3514                     NaN                   0        270000.0   \n",
       "3515                     NaN                   0        270000.0   \n",
       "3516                     NaN                   0        270000.0   \n",
       "3517                     NaN                   0        270000.0   \n",
       "3518                     NaN                   0        270000.0   \n",
       "3675                     0.0                   0         57060.0   \n",
       "3676                     0.0                   0         57060.0   \n",
       "3677                     0.0                   0         57060.0   \n",
       "3678                     0.0                   0         57060.0   \n",
       "3679                     0.0                   0         57060.0   \n",
       "3680                     0.0                   0         57060.0   \n",
       "3681                     0.0                   0         57060.0   \n",
       "3682                     0.0                   0         57060.0   \n",
       "\n",
       "      AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "353                   0.0                   0.0                     0.0   \n",
       "354                   0.0                   0.0                     0.0   \n",
       "355                   0.0                   0.0                     0.0   \n",
       "356                   0.0                   0.0                     0.0   \n",
       "357                   0.0                   0.0                     0.0   \n",
       "358                   0.0                   0.0                     0.0   \n",
       "359                   0.0                   0.0                     0.0   \n",
       "360                   0.0                   0.0                     0.0   \n",
       "361                   0.0                   0.0                     0.0   \n",
       "362                   0.0                   0.0                     0.0   \n",
       "363                   0.0                   0.0                     0.0   \n",
       "364                   0.0                   0.0                     0.0   \n",
       "365                   0.0                   0.0                     0.0   \n",
       "366                   0.0                   0.0                     0.0   \n",
       "374                   0.0                   0.0                     0.0   \n",
       "375                   0.0                   0.0                     0.0   \n",
       "376                   0.0                   0.0                     0.0   \n",
       "377                   0.0                   0.0                     0.0   \n",
       "378                   0.0                   0.0                     0.0   \n",
       "379                   0.0                   0.0                     0.0   \n",
       "380                   0.0                   0.0                     0.0   \n",
       "729                   0.0                   0.0                     0.0   \n",
       "730                   0.0                   0.0                     0.0   \n",
       "731                   0.0                   0.0                     0.0   \n",
       "732                   0.0                   0.0                     0.0   \n",
       "733                   0.0                   0.0                     0.0   \n",
       "734                   0.0                   0.0                     0.0   \n",
       "735                   0.0                   0.0                     0.0   \n",
       "736                   0.0                   0.0                     0.0   \n",
       "737                   0.0                   0.0                     0.0   \n",
       "...                   ...                   ...                     ...   \n",
       "2918                  0.0                   0.0                     0.0   \n",
       "2919                  0.0                   0.0                     0.0   \n",
       "2926                  0.0                   0.0                     0.0   \n",
       "2927                  0.0                   0.0                     0.0   \n",
       "3234                  0.0                   0.0                     0.0   \n",
       "3235                  0.0                   0.0                     0.0   \n",
       "3236                  0.0                   0.0                     0.0   \n",
       "3288                  0.0                   NaN                     0.0   \n",
       "3289                  0.0                   NaN                     0.0   \n",
       "3290                  0.0                   NaN                     0.0   \n",
       "3291                  0.0                   NaN                     0.0   \n",
       "3292                  0.0                   NaN                     0.0   \n",
       "3293                  0.0                   NaN                     0.0   \n",
       "3294                  0.0                   NaN                     0.0   \n",
       "3295                  0.0                   NaN                     0.0   \n",
       "3512                  0.0                   0.0                     0.0   \n",
       "3513                  0.0                   0.0                     0.0   \n",
       "3514                  0.0                   0.0                     0.0   \n",
       "3515                  0.0                   0.0                     0.0   \n",
       "3516                  0.0                   0.0                     0.0   \n",
       "3517                  0.0                   0.0                     0.0   \n",
       "3518                  0.0                   0.0                     0.0   \n",
       "3675                  0.0                   0.0                     0.0   \n",
       "3676                  0.0                   0.0                     0.0   \n",
       "3677                  0.0                   0.0                     0.0   \n",
       "3678                  0.0                   0.0                     0.0   \n",
       "3679                  0.0                   0.0                     0.0   \n",
       "3680                  0.0                   0.0                     0.0   \n",
       "3681                  0.0                   0.0                     0.0   \n",
       "3682                  0.0                   0.0                     0.0   \n",
       "\n",
       "          CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  TARGET  \\\n",
       "353       Credit card                -429          NaN     0.0   \n",
       "354       Credit card                -429          NaN     0.0   \n",
       "355       Credit card                -429          NaN     0.0   \n",
       "356       Credit card                -429          NaN     0.0   \n",
       "357       Credit card                -429          NaN     0.0   \n",
       "358       Credit card                -429          NaN     0.0   \n",
       "359       Credit card                -429          NaN     0.0   \n",
       "360   Consumer credit                -429          NaN     0.0   \n",
       "361   Consumer credit                -429          NaN     0.0   \n",
       "362   Consumer credit                -429          NaN     0.0   \n",
       "363   Consumer credit                -429          NaN     0.0   \n",
       "364   Consumer credit                -429          NaN     0.0   \n",
       "365   Consumer credit                -429          NaN     0.0   \n",
       "366   Consumer credit                -429          NaN     0.0   \n",
       "374   Consumer credit                -847          NaN     0.0   \n",
       "375   Consumer credit                -847          NaN     0.0   \n",
       "376   Consumer credit                -847          NaN     0.0   \n",
       "377   Consumer credit                -847          NaN     0.0   \n",
       "378   Consumer credit                -847          NaN     0.0   \n",
       "379   Consumer credit                -847          NaN     0.0   \n",
       "380   Consumer credit                -847          NaN     0.0   \n",
       "729   Consumer credit                -429          NaN     0.0   \n",
       "730   Consumer credit                -429          NaN     0.0   \n",
       "731   Consumer credit                -429          NaN     0.0   \n",
       "732   Consumer credit                -429          NaN     0.0   \n",
       "733   Consumer credit                -429          NaN     0.0   \n",
       "734   Consumer credit                -429          NaN     0.0   \n",
       "735   Consumer credit                -429          NaN     0.0   \n",
       "736   Consumer credit                -429          NaN     0.0   \n",
       "737   Consumer credit                -429          NaN     0.0   \n",
       "...               ...                 ...          ...     ...   \n",
       "2918  Consumer credit                -190          NaN     0.0   \n",
       "2919  Consumer credit                -190          NaN     0.0   \n",
       "2926  Consumer credit                -189          NaN     0.0   \n",
       "2927  Consumer credit                -189          NaN     0.0   \n",
       "3234  Consumer credit                -422          NaN     0.0   \n",
       "3235  Consumer credit                -422          NaN     0.0   \n",
       "3236  Consumer credit                -422          NaN     0.0   \n",
       "3288  Consumer credit                -168          NaN     0.0   \n",
       "3289  Consumer credit                -168          NaN     0.0   \n",
       "3290  Consumer credit                -168          NaN     0.0   \n",
       "3291  Consumer credit                -168          NaN     0.0   \n",
       "3292  Consumer credit                -168          NaN     0.0   \n",
       "3293  Consumer credit                -168          NaN     0.0   \n",
       "3294  Consumer credit                -168          NaN     0.0   \n",
       "3295  Consumer credit                -168          NaN     0.0   \n",
       "3512      Credit card                -555          NaN     0.0   \n",
       "3513      Credit card                -555          NaN     0.0   \n",
       "3514      Credit card                -555          NaN     0.0   \n",
       "3515      Credit card                -555          NaN     0.0   \n",
       "3516      Credit card                -555          NaN     0.0   \n",
       "3517      Credit card                -555          NaN     0.0   \n",
       "3518      Credit card                -555          NaN     0.0   \n",
       "3675  Consumer credit                  -7          NaN     0.0   \n",
       "3676  Consumer credit                  -7          NaN     0.0   \n",
       "3677  Consumer credit                  -7          NaN     0.0   \n",
       "3678  Consumer credit                  -7          NaN     0.0   \n",
       "3679  Consumer credit                  -7          NaN     0.0   \n",
       "3680  Consumer credit                  -7          NaN     0.0   \n",
       "3681  Consumer credit                  -7          NaN     0.0   \n",
       "3682  Consumer credit                  -7          NaN     0.0   \n",
       "\n",
       "      DAYS_CREDIT_DIFF  DAYS_CREDIT_DIFF_MEAN  \n",
       "353                  0             139.285714  \n",
       "354                343             139.285714  \n",
       "355                 28             139.285714  \n",
       "356                131             139.285714  \n",
       "357                299             139.285714  \n",
       "358                123             139.285714  \n",
       "359                 51             139.285714  \n",
       "360                  0             139.285714  \n",
       "361                343             139.285714  \n",
       "362                 28             139.285714  \n",
       "363                131             139.285714  \n",
       "364                299             139.285714  \n",
       "365                123             139.285714  \n",
       "366                 51             139.285714  \n",
       "374                  0             139.285714  \n",
       "375                343             139.285714  \n",
       "376                 28             139.285714  \n",
       "377                131             139.285714  \n",
       "378                299             139.285714  \n",
       "379                123             139.285714  \n",
       "380                 51             139.285714  \n",
       "729                  0             122.764706  \n",
       "730                123             122.764706  \n",
       "731                296             122.764706  \n",
       "732                204             122.764706  \n",
       "733                  7             122.764706  \n",
       "734                158             122.764706  \n",
       "735                 86             122.764706  \n",
       "736                202             122.764706  \n",
       "737                  0             122.764706  \n",
       "...                ...                    ...  \n",
       "2918              1450             641.250000  \n",
       "2919               100             641.250000  \n",
       "2926                 0              92.500000  \n",
       "2927               185              92.500000  \n",
       "3234                 0             211.000000  \n",
       "3235               264             211.000000  \n",
       "3236               369             211.000000  \n",
       "3288                 0             326.250000  \n",
       "3289                91             326.250000  \n",
       "3290                74             326.250000  \n",
       "3291               115             326.250000  \n",
       "3292               250             326.250000  \n",
       "3293                34             326.250000  \n",
       "3294               585             326.250000  \n",
       "3295              1461             326.250000  \n",
       "3512                 0             336.142857  \n",
       "3513               429             336.142857  \n",
       "3514              1412             336.142857  \n",
       "3515               329             336.142857  \n",
       "3516               121             336.142857  \n",
       "3517                61             336.142857  \n",
       "3518                 1             336.142857  \n",
       "3675                 0             127.250000  \n",
       "3676               112             127.250000  \n",
       "3677               173             127.250000  \n",
       "3678                31             127.250000  \n",
       "3679                47             127.250000  \n",
       "3680               290             127.250000  \n",
       "3681                 2             127.250000  \n",
       "3682               363             127.250000  \n",
       "\n",
       "[293 rows x 20 columns]"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[(bureau_full_df.CREDIT_ACTIVE == 'Closed') & (bureau_full_df.DAYS_CREDIT_ENDDATE > 0)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = bureau_full_df[['SK_ID_CURR', 'SK_ID_BUREAU']].groupby(by = ['SK_ID_CURR'])\n",
    "x = x['SK_ID_BUREAU'].count().reset_index()\n",
    "x = x.rename(index=str, columns={'SK_ID_BUREAU': 'BUREAU_NUMBER_OF_LOANS'})\n",
    "bureau_full_df = bureau_full_df.merge(x, on=['SK_ID_CURR'], how='left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>248484</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896630</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-857</td>\n",
       "      <td>0</td>\n",
       "      <td>-492.0</td>\n",
       "      <td>-553.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>112500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248485</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896631</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-909</td>\n",
       "      <td>0</td>\n",
       "      <td>-179.0</td>\n",
       "      <td>-877.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>279720.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248486</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896632</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-879</td>\n",
       "      <td>0</td>\n",
       "      <td>-514.0</td>\n",
       "      <td>-544.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91620.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248487</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896633</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1572</td>\n",
       "      <td>0</td>\n",
       "      <td>-1329.0</td>\n",
       "      <td>-1328.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>85500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248488</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896634</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-559</td>\n",
       "      <td>0</td>\n",
       "      <td>902.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>337680.0</td>\n",
       "      <td>113166.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-6</td>\n",
       "      <td>4630.5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248489</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896635</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-49</td>\n",
       "      <td>0</td>\n",
       "      <td>1778.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>378000.0</td>\n",
       "      <td>373239.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-16</td>\n",
       "      <td>10822.5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248490</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896636</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-320</td>\n",
       "      <td>0</td>\n",
       "      <td>411.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>168345.0</td>\n",
       "      <td>110281.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-10</td>\n",
       "      <td>9364.5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "248484      100001       5896630        Closed      currency 1         -857   \n",
       "248485      100001       5896631        Closed      currency 1         -909   \n",
       "248486      100001       5896632        Closed      currency 1         -879   \n",
       "248487      100001       5896633        Closed      currency 1        -1572   \n",
       "248488      100001       5896634        Active      currency 1         -559   \n",
       "248489      100001       5896635        Active      currency 1          -49   \n",
       "248490      100001       5896636        Active      currency 1         -320   \n",
       "\n",
       "        CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "248484                   0               -492.0             -553.0   \n",
       "248485                   0               -179.0             -877.0   \n",
       "248486                   0               -514.0             -544.0   \n",
       "248487                   0              -1329.0            -1328.0   \n",
       "248488                   0                902.0                NaN   \n",
       "248489                   0               1778.0                NaN   \n",
       "248490                   0                411.0                NaN   \n",
       "\n",
       "        AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "248484                     NaN                   0        112500.0   \n",
       "248485                     NaN                   0        279720.0   \n",
       "248486                     NaN                   0         91620.0   \n",
       "248487                     NaN                   0         85500.0   \n",
       "248488                     NaN                   0        337680.0   \n",
       "248489                     NaN                   0        378000.0   \n",
       "248490                     NaN                   0        168345.0   \n",
       "\n",
       "        AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "248484                  0.0                   0.0                     0.0   \n",
       "248485                  0.0                   0.0                     0.0   \n",
       "248486                  0.0                   0.0                     0.0   \n",
       "248487                  0.0                   0.0                     0.0   \n",
       "248488             113166.0                   0.0                     0.0   \n",
       "248489             373239.0                   0.0                     0.0   \n",
       "248490             110281.5                   NaN                     0.0   \n",
       "\n",
       "            CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \\\n",
       "248484  Consumer credit                -155          0.0   \n",
       "248485  Consumer credit                -155          0.0   \n",
       "248486  Consumer credit                -155          0.0   \n",
       "248487  Consumer credit                -155          0.0   \n",
       "248488  Consumer credit                  -6       4630.5   \n",
       "248489  Consumer credit                 -16      10822.5   \n",
       "248490  Consumer credit                 -10       9364.5   \n",
       "\n",
       "        BUREAU_NUMBER_OF_LOANS  \n",
       "248484                       7  \n",
       "248485                       7  \n",
       "248486                       7  \n",
       "248487                       7  \n",
       "248488                       7  \n",
       "248489                       7  \n",
       "248490                       7  "
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 100001]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Gerar features baseadas no número de itens para cada cliente no CREDIT_ACTIVE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "for credit_active_state in bureau_full_df['CREDIT_ACTIVE'].unique():\n",
    "    x = bureau_full_df[bureau_full_df.CREDIT_ACTIVE == credit_active_state][['SK_ID_CURR', 'CREDIT_ACTIVE']].groupby(by = ['SK_ID_CURR'])\n",
    "    x = x['CREDIT_ACTIVE'].count().reset_index()\n",
    "\n",
    "    new_column_name = 'BUREAU_NUMBER_OF_%s_LOANS' % credit_active_state.upper().replace(' ', '_')\n",
    "    x = x.rename(index=str, columns={'CREDIT_ACTIVE': new_column_name})\n",
    "    bureau_full_df = bureau_full_df.merge(x, on=['SK_ID_CURR'], how='left')\n",
    "    bureau_full_df[new_column_name] = bureau_full_df[new_column_name].fillna(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_BAD DEBT_LOANS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>248484</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896630</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-857</td>\n",
       "      <td>0</td>\n",
       "      <td>-492.0</td>\n",
       "      <td>-553.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>112500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248485</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896631</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-909</td>\n",
       "      <td>0</td>\n",
       "      <td>-179.0</td>\n",
       "      <td>-877.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>279720.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248486</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896632</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-879</td>\n",
       "      <td>0</td>\n",
       "      <td>-514.0</td>\n",
       "      <td>-544.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91620.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248487</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896633</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1572</td>\n",
       "      <td>0</td>\n",
       "      <td>-1329.0</td>\n",
       "      <td>-1328.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>85500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-155</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248488</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896634</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-559</td>\n",
       "      <td>0</td>\n",
       "      <td>902.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>337680.0</td>\n",
       "      <td>113166.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-6</td>\n",
       "      <td>4630.5</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248489</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896635</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-49</td>\n",
       "      <td>0</td>\n",
       "      <td>1778.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>378000.0</td>\n",
       "      <td>373239.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-16</td>\n",
       "      <td>10822.5</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>248490</th>\n",
       "      <td>100001</td>\n",
       "      <td>5896636</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-320</td>\n",
       "      <td>0</td>\n",
       "      <td>411.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>168345.0</td>\n",
       "      <td>110281.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-10</td>\n",
       "      <td>9364.5</td>\n",
       "      <td>7</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "248484      100001       5896630        Closed      currency 1         -857   \n",
       "248485      100001       5896631        Closed      currency 1         -909   \n",
       "248486      100001       5896632        Closed      currency 1         -879   \n",
       "248487      100001       5896633        Closed      currency 1        -1572   \n",
       "248488      100001       5896634        Active      currency 1         -559   \n",
       "248489      100001       5896635        Active      currency 1          -49   \n",
       "248490      100001       5896636        Active      currency 1         -320   \n",
       "\n",
       "        CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "248484                   0               -492.0             -553.0   \n",
       "248485                   0               -179.0             -877.0   \n",
       "248486                   0               -514.0             -544.0   \n",
       "248487                   0              -1329.0            -1328.0   \n",
       "248488                   0                902.0                NaN   \n",
       "248489                   0               1778.0                NaN   \n",
       "248490                   0                411.0                NaN   \n",
       "\n",
       "        AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "248484                     NaN                   0        112500.0   \n",
       "248485                     NaN                   0        279720.0   \n",
       "248486                     NaN                   0         91620.0   \n",
       "248487                     NaN                   0         85500.0   \n",
       "248488                     NaN                   0        337680.0   \n",
       "248489                     NaN                   0        378000.0   \n",
       "248490                     NaN                   0        168345.0   \n",
       "\n",
       "        AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "248484                  0.0                   0.0                     0.0   \n",
       "248485                  0.0                   0.0                     0.0   \n",
       "248486                  0.0                   0.0                     0.0   \n",
       "248487                  0.0                   0.0                     0.0   \n",
       "248488             113166.0                   0.0                     0.0   \n",
       "248489             373239.0                   0.0                     0.0   \n",
       "248490             110281.5                   NaN                     0.0   \n",
       "\n",
       "            CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \\\n",
       "248484  Consumer credit                -155          0.0   \n",
       "248485  Consumer credit                -155          0.0   \n",
       "248486  Consumer credit                -155          0.0   \n",
       "248487  Consumer credit                -155          0.0   \n",
       "248488  Consumer credit                  -6       4630.5   \n",
       "248489  Consumer credit                 -16      10822.5   \n",
       "248490  Consumer credit                 -10       9364.5   \n",
       "\n",
       "        BUREAU_NUMBER_OF_LOANS  BUREAU_NUMBER_OF_CLOSED_LOANS  \\\n",
       "248484                       7                            4.0   \n",
       "248485                       7                            4.0   \n",
       "248486                       7                            4.0   \n",
       "248487                       7                            4.0   \n",
       "248488                       7                            4.0   \n",
       "248489                       7                            4.0   \n",
       "248490                       7                            4.0   \n",
       "\n",
       "        BUREAU_NUMBER_OF_ACTIVE_LOANS  BUREAU_NUMBER_OF_SOLD_LOANS  \\\n",
       "248484                            3.0                          0.0   \n",
       "248485                            3.0                          0.0   \n",
       "248486                            3.0                          0.0   \n",
       "248487                            3.0                          0.0   \n",
       "248488                            3.0                          0.0   \n",
       "248489                            3.0                          0.0   \n",
       "248490                            3.0                          0.0   \n",
       "\n",
       "        BUREAU_NUMBER_OF_BAD DEBT_LOANS  \n",
       "248484                              0.0  \n",
       "248485                              0.0  \n",
       "248486                              0.0  \n",
       "248487                              0.0  \n",
       "248488                              0.0  \n",
       "248489                              0.0  \n",
       "248490                              0.0  "
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 100001]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Qual o tempo entre um emprestimo e outro?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "grp = bureau_full_df[['SK_ID_CURR', 'DAYS_CREDIT']].groupby(by = ['SK_ID_CURR'])\n",
    "grp1 = grp.apply(lambda x: x.sort_values(['DAYS_CREDIT'], ascending = False)).reset_index(drop = True)\n",
    "grp1['DAYS_CREDIT1'] = grp1['DAYS_CREDIT'] * -1\n",
    "grp1['DAYS_CREDIT_DIFF'] = grp1.groupby(by = ['SK_ID_CURR'])['DAYS_CREDIT1'].diff()\n",
    "grp1['DAYS_CREDIT_DIFF'] = grp1['DAYS_CREDIT_DIFF'].fillna(0).astype('uint32')\n",
    "del grp1['DAYS_CREDIT'], grp1['DAYS_CREDIT1']\n",
    "grp1.head()\n",
    "\n",
    "bureau_full_df = bureau_full_df.merge(grp1, on = ['SK_ID_CURR'], how = 'left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Qual o tempo medio entre os emprestimos realizados?\n",
    "x = bureau_full_df[['SK_ID_CURR', 'DAYS_CREDIT_DIFF']].groupby(by = ['SK_ID_CURR'])['DAYS_CREDIT_DIFF'].mean()\n",
    "x = x.to_frame().reset_index().rename(index=str, columns={'DAYS_CREDIT_DIFF': 'DAYS_CREDIT_DIFF_MEAN'})\n",
    "bureau_full_df = bureau_full_df.merge(x, on=['SK_ID_CURR'], how='left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_BAD DEBT_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6169431</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169432</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169433</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169434</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169435</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169436</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169437</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169438</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158904</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1125</td>\n",
       "      <td>0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>-1038.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>40761.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-1038</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169439</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169440</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169441</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169442</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169443</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169444</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169445</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169446</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158905</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-476</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-48.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-47</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169447</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169448</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169449</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169450</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169451</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169452</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169453</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169454</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158906</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1437</td>\n",
       "      <td>0</td>\n",
       "      <td>-1072.0</td>\n",
       "      <td>-1185.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1185</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169455</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169456</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169457</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169458</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169459</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169460</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158907</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1121</td>\n",
       "      <td>0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>-911.0</td>\n",
       "      <td>3321.000</td>\n",
       "      <td>0</td>\n",
       "      <td>19071.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-906</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169465</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169466</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169467</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169468</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169469</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169470</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158908</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-645</td>\n",
       "      <td>0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>5043.645</td>\n",
       "      <td>0</td>\n",
       "      <td>120735.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-34</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169471</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169472</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169473</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169474</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169475</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169476</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169477</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6169478</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158909</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-103</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.500</td>\n",
       "      <td>0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>31988.565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178334</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178335</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178336</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178337</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178338</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178339</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178340</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12178341</th>\n",
       "      <td>100002</td>\n",
       "      <td>6158903</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1042</td>\n",
       "      <td>0</td>\n",
       "      <td>780.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541540</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541541</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541542</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>169</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541543</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541544</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541545</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541546</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13541547</th>\n",
       "      <td>100002</td>\n",
       "      <td>6113835</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1043</td>\n",
       "      <td>0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>-967.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-758</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>312</td>\n",
       "      <td>166.75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>64 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "6169431       100002       6158904        Closed      currency 1        -1125   \n",
       "6169432       100002       6158904        Closed      currency 1        -1125   \n",
       "6169433       100002       6158904        Closed      currency 1        -1125   \n",
       "6169434       100002       6158904        Closed      currency 1        -1125   \n",
       "6169435       100002       6158904        Closed      currency 1        -1125   \n",
       "6169436       100002       6158904        Closed      currency 1        -1125   \n",
       "6169437       100002       6158904        Closed      currency 1        -1125   \n",
       "6169438       100002       6158904        Closed      currency 1        -1125   \n",
       "6169439       100002       6158905        Closed      currency 1         -476   \n",
       "6169440       100002       6158905        Closed      currency 1         -476   \n",
       "6169441       100002       6158905        Closed      currency 1         -476   \n",
       "6169442       100002       6158905        Closed      currency 1         -476   \n",
       "6169443       100002       6158905        Closed      currency 1         -476   \n",
       "6169444       100002       6158905        Closed      currency 1         -476   \n",
       "6169445       100002       6158905        Closed      currency 1         -476   \n",
       "6169446       100002       6158905        Closed      currency 1         -476   \n",
       "6169447       100002       6158906        Closed      currency 1        -1437   \n",
       "6169448       100002       6158906        Closed      currency 1        -1437   \n",
       "6169449       100002       6158906        Closed      currency 1        -1437   \n",
       "6169450       100002       6158906        Closed      currency 1        -1437   \n",
       "6169451       100002       6158906        Closed      currency 1        -1437   \n",
       "6169452       100002       6158906        Closed      currency 1        -1437   \n",
       "6169453       100002       6158906        Closed      currency 1        -1437   \n",
       "6169454       100002       6158906        Closed      currency 1        -1437   \n",
       "6169455       100002       6158907        Closed      currency 1        -1121   \n",
       "6169456       100002       6158907        Closed      currency 1        -1121   \n",
       "6169457       100002       6158907        Closed      currency 1        -1121   \n",
       "6169458       100002       6158907        Closed      currency 1        -1121   \n",
       "6169459       100002       6158907        Closed      currency 1        -1121   \n",
       "6169460       100002       6158907        Closed      currency 1        -1121   \n",
       "...              ...           ...           ...             ...          ...   \n",
       "6169465       100002       6158908        Closed      currency 1         -645   \n",
       "6169466       100002       6158908        Closed      currency 1         -645   \n",
       "6169467       100002       6158908        Closed      currency 1         -645   \n",
       "6169468       100002       6158908        Closed      currency 1         -645   \n",
       "6169469       100002       6158908        Closed      currency 1         -645   \n",
       "6169470       100002       6158908        Closed      currency 1         -645   \n",
       "6169471       100002       6158909        Active      currency 1         -103   \n",
       "6169472       100002       6158909        Active      currency 1         -103   \n",
       "6169473       100002       6158909        Active      currency 1         -103   \n",
       "6169474       100002       6158909        Active      currency 1         -103   \n",
       "6169475       100002       6158909        Active      currency 1         -103   \n",
       "6169476       100002       6158909        Active      currency 1         -103   \n",
       "6169477       100002       6158909        Active      currency 1         -103   \n",
       "6169478       100002       6158909        Active      currency 1         -103   \n",
       "12178334      100002       6158903        Active      currency 1        -1042   \n",
       "12178335      100002       6158903        Active      currency 1        -1042   \n",
       "12178336      100002       6158903        Active      currency 1        -1042   \n",
       "12178337      100002       6158903        Active      currency 1        -1042   \n",
       "12178338      100002       6158903        Active      currency 1        -1042   \n",
       "12178339      100002       6158903        Active      currency 1        -1042   \n",
       "12178340      100002       6158903        Active      currency 1        -1042   \n",
       "12178341      100002       6158903        Active      currency 1        -1042   \n",
       "13541540      100002       6113835        Closed      currency 1        -1043   \n",
       "13541541      100002       6113835        Closed      currency 1        -1043   \n",
       "13541542      100002       6113835        Closed      currency 1        -1043   \n",
       "13541543      100002       6113835        Closed      currency 1        -1043   \n",
       "13541544      100002       6113835        Closed      currency 1        -1043   \n",
       "13541545      100002       6113835        Closed      currency 1        -1043   \n",
       "13541546      100002       6113835        Closed      currency 1        -1043   \n",
       "13541547      100002       6113835        Closed      currency 1        -1043   \n",
       "\n",
       "          CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "6169431                    0              -1038.0            -1038.0   \n",
       "6169432                    0              -1038.0            -1038.0   \n",
       "6169433                    0              -1038.0            -1038.0   \n",
       "6169434                    0              -1038.0            -1038.0   \n",
       "6169435                    0              -1038.0            -1038.0   \n",
       "6169436                    0              -1038.0            -1038.0   \n",
       "6169437                    0              -1038.0            -1038.0   \n",
       "6169438                    0              -1038.0            -1038.0   \n",
       "6169439                    0                  NaN              -48.0   \n",
       "6169440                    0                  NaN              -48.0   \n",
       "6169441                    0                  NaN              -48.0   \n",
       "6169442                    0                  NaN              -48.0   \n",
       "6169443                    0                  NaN              -48.0   \n",
       "6169444                    0                  NaN              -48.0   \n",
       "6169445                    0                  NaN              -48.0   \n",
       "6169446                    0                  NaN              -48.0   \n",
       "6169447                    0              -1072.0            -1185.0   \n",
       "6169448                    0              -1072.0            -1185.0   \n",
       "6169449                    0              -1072.0            -1185.0   \n",
       "6169450                    0              -1072.0            -1185.0   \n",
       "6169451                    0              -1072.0            -1185.0   \n",
       "6169452                    0              -1072.0            -1185.0   \n",
       "6169453                    0              -1072.0            -1185.0   \n",
       "6169454                    0              -1072.0            -1185.0   \n",
       "6169455                    0               -911.0             -911.0   \n",
       "6169456                    0               -911.0             -911.0   \n",
       "6169457                    0               -911.0             -911.0   \n",
       "6169458                    0               -911.0             -911.0   \n",
       "6169459                    0               -911.0             -911.0   \n",
       "6169460                    0               -911.0             -911.0   \n",
       "...                      ...                  ...                ...   \n",
       "6169465                    0                 85.0              -36.0   \n",
       "6169466                    0                 85.0              -36.0   \n",
       "6169467                    0                 85.0              -36.0   \n",
       "6169468                    0                 85.0              -36.0   \n",
       "6169469                    0                 85.0              -36.0   \n",
       "6169470                    0                 85.0              -36.0   \n",
       "6169471                    0                  NaN                NaN   \n",
       "6169472                    0                  NaN                NaN   \n",
       "6169473                    0                  NaN                NaN   \n",
       "6169474                    0                  NaN                NaN   \n",
       "6169475                    0                  NaN                NaN   \n",
       "6169476                    0                  NaN                NaN   \n",
       "6169477                    0                  NaN                NaN   \n",
       "6169478                    0                  NaN                NaN   \n",
       "12178334                   0                780.0                NaN   \n",
       "12178335                   0                780.0                NaN   \n",
       "12178336                   0                780.0                NaN   \n",
       "12178337                   0                780.0                NaN   \n",
       "12178338                   0                780.0                NaN   \n",
       "12178339                   0                780.0                NaN   \n",
       "12178340                   0                780.0                NaN   \n",
       "12178341                   0                780.0                NaN   \n",
       "13541540                   0                 62.0             -967.0   \n",
       "13541541                   0                 62.0             -967.0   \n",
       "13541542                   0                 62.0             -967.0   \n",
       "13541543                   0                 62.0             -967.0   \n",
       "13541544                   0                 62.0             -967.0   \n",
       "13541545                   0                 62.0             -967.0   \n",
       "13541546                   0                 62.0             -967.0   \n",
       "13541547                   0                 62.0             -967.0   \n",
       "\n",
       "          AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "6169431                      NaN                   0       40761.000   \n",
       "6169432                      NaN                   0       40761.000   \n",
       "6169433                      NaN                   0       40761.000   \n",
       "6169434                      NaN                   0       40761.000   \n",
       "6169435                      NaN                   0       40761.000   \n",
       "6169436                      NaN                   0       40761.000   \n",
       "6169437                      NaN                   0       40761.000   \n",
       "6169438                      NaN                   0       40761.000   \n",
       "6169439                      NaN                   0           0.000   \n",
       "6169440                      NaN                   0           0.000   \n",
       "6169441                      NaN                   0           0.000   \n",
       "6169442                      NaN                   0           0.000   \n",
       "6169443                      NaN                   0           0.000   \n",
       "6169444                      NaN                   0           0.000   \n",
       "6169445                      NaN                   0           0.000   \n",
       "6169446                      NaN                   0           0.000   \n",
       "6169447                    0.000                   0      135000.000   \n",
       "6169448                    0.000                   0      135000.000   \n",
       "6169449                    0.000                   0      135000.000   \n",
       "6169450                    0.000                   0      135000.000   \n",
       "6169451                    0.000                   0      135000.000   \n",
       "6169452                    0.000                   0      135000.000   \n",
       "6169453                    0.000                   0      135000.000   \n",
       "6169454                    0.000                   0      135000.000   \n",
       "6169455                 3321.000                   0       19071.000   \n",
       "6169456                 3321.000                   0       19071.000   \n",
       "6169457                 3321.000                   0       19071.000   \n",
       "6169458                 3321.000                   0       19071.000   \n",
       "6169459                 3321.000                   0       19071.000   \n",
       "6169460                 3321.000                   0       19071.000   \n",
       "...                          ...                 ...             ...   \n",
       "6169465                 5043.645                   0      120735.000   \n",
       "6169466                 5043.645                   0      120735.000   \n",
       "6169467                 5043.645                   0      120735.000   \n",
       "6169468                 5043.645                   0      120735.000   \n",
       "6169469                 5043.645                   0      120735.000   \n",
       "6169470                 5043.645                   0      120735.000   \n",
       "6169471                   40.500                   0       31988.565   \n",
       "6169472                   40.500                   0       31988.565   \n",
       "6169473                   40.500                   0       31988.565   \n",
       "6169474                   40.500                   0       31988.565   \n",
       "6169475                   40.500                   0       31988.565   \n",
       "6169476                   40.500                   0       31988.565   \n",
       "6169477                   40.500                   0       31988.565   \n",
       "6169478                   40.500                   0       31988.565   \n",
       "12178334                     NaN                   0      450000.000   \n",
       "12178335                     NaN                   0      450000.000   \n",
       "12178336                     NaN                   0      450000.000   \n",
       "12178337                     NaN                   0      450000.000   \n",
       "12178338                     NaN                   0      450000.000   \n",
       "12178339                     NaN                   0      450000.000   \n",
       "12178340                     NaN                   0      450000.000   \n",
       "12178341                     NaN                   0      450000.000   \n",
       "13541540                   0.000                   0       67500.000   \n",
       "13541541                   0.000                   0       67500.000   \n",
       "13541542                   0.000                   0       67500.000   \n",
       "13541543                   0.000                   0       67500.000   \n",
       "13541544                   0.000                   0       67500.000   \n",
       "13541545                   0.000                   0       67500.000   \n",
       "13541546                   0.000                   0       67500.000   \n",
       "13541547                   0.000                   0       67500.000   \n",
       "\n",
       "          AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "6169431                   NaN                   NaN                     0.0   \n",
       "6169432                   NaN                   NaN                     0.0   \n",
       "6169433                   NaN                   NaN                     0.0   \n",
       "6169434                   NaN                   NaN                     0.0   \n",
       "6169435                   NaN                   NaN                     0.0   \n",
       "6169436                   NaN                   NaN                     0.0   \n",
       "6169437                   NaN                   NaN                     0.0   \n",
       "6169438                   NaN                   NaN                     0.0   \n",
       "6169439                   0.0                   NaN                     0.0   \n",
       "6169440                   0.0                   NaN                     0.0   \n",
       "6169441                   0.0                   NaN                     0.0   \n",
       "6169442                   0.0                   NaN                     0.0   \n",
       "6169443                   0.0                   NaN                     0.0   \n",
       "6169444                   0.0                   NaN                     0.0   \n",
       "6169445                   0.0                   NaN                     0.0   \n",
       "6169446                   0.0                   NaN                     0.0   \n",
       "6169447                   0.0                 0.000                     0.0   \n",
       "6169448                   0.0                 0.000                     0.0   \n",
       "6169449                   0.0                 0.000                     0.0   \n",
       "6169450                   0.0                 0.000                     0.0   \n",
       "6169451                   0.0                 0.000                     0.0   \n",
       "6169452                   0.0                 0.000                     0.0   \n",
       "6169453                   0.0                 0.000                     0.0   \n",
       "6169454                   0.0                 0.000                     0.0   \n",
       "6169455                   NaN                   NaN                     0.0   \n",
       "6169456                   NaN                   NaN                     0.0   \n",
       "6169457                   NaN                   NaN                     0.0   \n",
       "6169458                   NaN                   NaN                     0.0   \n",
       "6169459                   NaN                   NaN                     0.0   \n",
       "6169460                   NaN                   NaN                     0.0   \n",
       "...                       ...                   ...                     ...   \n",
       "6169465                   0.0                 0.000                     0.0   \n",
       "6169466                   0.0                 0.000                     0.0   \n",
       "6169467                   0.0                 0.000                     0.0   \n",
       "6169468                   0.0                 0.000                     0.0   \n",
       "6169469                   0.0                 0.000                     0.0   \n",
       "6169470                   0.0                 0.000                     0.0   \n",
       "6169471                   0.0             31988.565                     0.0   \n",
       "6169472                   0.0             31988.565                     0.0   \n",
       "6169473                   0.0             31988.565                     0.0   \n",
       "6169474                   0.0             31988.565                     0.0   \n",
       "6169475                   0.0             31988.565                     0.0   \n",
       "6169476                   0.0             31988.565                     0.0   \n",
       "6169477                   0.0             31988.565                     0.0   \n",
       "6169478                   0.0             31988.565                     0.0   \n",
       "12178334             245781.0                 0.000                     0.0   \n",
       "12178335             245781.0                 0.000                     0.0   \n",
       "12178336             245781.0                 0.000                     0.0   \n",
       "12178337             245781.0                 0.000                     0.0   \n",
       "12178338             245781.0                 0.000                     0.0   \n",
       "12178339             245781.0                 0.000                     0.0   \n",
       "12178340             245781.0                 0.000                     0.0   \n",
       "12178341             245781.0                 0.000                     0.0   \n",
       "13541540                  NaN                   NaN                     0.0   \n",
       "13541541                  NaN                   NaN                     0.0   \n",
       "13541542                  NaN                   NaN                     0.0   \n",
       "13541543                  NaN                   NaN                     0.0   \n",
       "13541544                  NaN                   NaN                     0.0   \n",
       "13541545                  NaN                   NaN                     0.0   \n",
       "13541546                  NaN                   NaN                     0.0   \n",
       "13541547                  NaN                   NaN                     0.0   \n",
       "\n",
       "              CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \\\n",
       "6169431       Credit card               -1038          0.0   \n",
       "6169432       Credit card               -1038          0.0   \n",
       "6169433       Credit card               -1038          0.0   \n",
       "6169434       Credit card               -1038          0.0   \n",
       "6169435       Credit card               -1038          0.0   \n",
       "6169436       Credit card               -1038          0.0   \n",
       "6169437       Credit card               -1038          0.0   \n",
       "6169438       Credit card               -1038          0.0   \n",
       "6169439       Credit card                 -47          NaN   \n",
       "6169440       Credit card                 -47          NaN   \n",
       "6169441       Credit card                 -47          NaN   \n",
       "6169442       Credit card                 -47          NaN   \n",
       "6169443       Credit card                 -47          NaN   \n",
       "6169444       Credit card                 -47          NaN   \n",
       "6169445       Credit card                 -47          NaN   \n",
       "6169446       Credit card                 -47          NaN   \n",
       "6169447   Consumer credit               -1185          0.0   \n",
       "6169448   Consumer credit               -1185          0.0   \n",
       "6169449   Consumer credit               -1185          0.0   \n",
       "6169450   Consumer credit               -1185          0.0   \n",
       "6169451   Consumer credit               -1185          0.0   \n",
       "6169452   Consumer credit               -1185          0.0   \n",
       "6169453   Consumer credit               -1185          0.0   \n",
       "6169454   Consumer credit               -1185          0.0   \n",
       "6169455   Consumer credit                -906          0.0   \n",
       "6169456   Consumer credit                -906          0.0   \n",
       "6169457   Consumer credit                -906          0.0   \n",
       "6169458   Consumer credit                -906          0.0   \n",
       "6169459   Consumer credit                -906          0.0   \n",
       "6169460   Consumer credit                -906          0.0   \n",
       "...                   ...                 ...          ...   \n",
       "6169465   Consumer credit                 -34          0.0   \n",
       "6169466   Consumer credit                 -34          0.0   \n",
       "6169467   Consumer credit                 -34          0.0   \n",
       "6169468   Consumer credit                 -34          0.0   \n",
       "6169469   Consumer credit                 -34          0.0   \n",
       "6169470   Consumer credit                 -34          0.0   \n",
       "6169471       Credit card                 -24          0.0   \n",
       "6169472       Credit card                 -24          0.0   \n",
       "6169473       Credit card                 -24          0.0   \n",
       "6169474       Credit card                 -24          0.0   \n",
       "6169475       Credit card                 -24          0.0   \n",
       "6169476       Credit card                 -24          0.0   \n",
       "6169477       Credit card                 -24          0.0   \n",
       "6169478       Credit card                 -24          0.0   \n",
       "12178334  Consumer credit                  -7          0.0   \n",
       "12178335  Consumer credit                  -7          0.0   \n",
       "12178336  Consumer credit                  -7          0.0   \n",
       "12178337  Consumer credit                  -7          0.0   \n",
       "12178338  Consumer credit                  -7          0.0   \n",
       "12178339  Consumer credit                  -7          0.0   \n",
       "12178340  Consumer credit                  -7          0.0   \n",
       "12178341  Consumer credit                  -7          0.0   \n",
       "13541540      Credit card                -758          0.0   \n",
       "13541541      Credit card                -758          0.0   \n",
       "13541542      Credit card                -758          0.0   \n",
       "13541543      Credit card                -758          0.0   \n",
       "13541544      Credit card                -758          0.0   \n",
       "13541545      Credit card                -758          0.0   \n",
       "13541546      Credit card                -758          0.0   \n",
       "13541547      Credit card                -758          0.0   \n",
       "\n",
       "          BUREAU_NUMBER_OF_LOANS  BUREAU_NUMBER_OF_CLOSED_LOANS  \\\n",
       "6169431                        8                            6.0   \n",
       "6169432                        8                            6.0   \n",
       "6169433                        8                            6.0   \n",
       "6169434                        8                            6.0   \n",
       "6169435                        8                            6.0   \n",
       "6169436                        8                            6.0   \n",
       "6169437                        8                            6.0   \n",
       "6169438                        8                            6.0   \n",
       "6169439                        8                            6.0   \n",
       "6169440                        8                            6.0   \n",
       "6169441                        8                            6.0   \n",
       "6169442                        8                            6.0   \n",
       "6169443                        8                            6.0   \n",
       "6169444                        8                            6.0   \n",
       "6169445                        8                            6.0   \n",
       "6169446                        8                            6.0   \n",
       "6169447                        8                            6.0   \n",
       "6169448                        8                            6.0   \n",
       "6169449                        8                            6.0   \n",
       "6169450                        8                            6.0   \n",
       "6169451                        8                            6.0   \n",
       "6169452                        8                            6.0   \n",
       "6169453                        8                            6.0   \n",
       "6169454                        8                            6.0   \n",
       "6169455                        8                            6.0   \n",
       "6169456                        8                            6.0   \n",
       "6169457                        8                            6.0   \n",
       "6169458                        8                            6.0   \n",
       "6169459                        8                            6.0   \n",
       "6169460                        8                            6.0   \n",
       "...                          ...                            ...   \n",
       "6169465                        8                            6.0   \n",
       "6169466                        8                            6.0   \n",
       "6169467                        8                            6.0   \n",
       "6169468                        8                            6.0   \n",
       "6169469                        8                            6.0   \n",
       "6169470                        8                            6.0   \n",
       "6169471                        8                            6.0   \n",
       "6169472                        8                            6.0   \n",
       "6169473                        8                            6.0   \n",
       "6169474                        8                            6.0   \n",
       "6169475                        8                            6.0   \n",
       "6169476                        8                            6.0   \n",
       "6169477                        8                            6.0   \n",
       "6169478                        8                            6.0   \n",
       "12178334                       8                            6.0   \n",
       "12178335                       8                            6.0   \n",
       "12178336                       8                            6.0   \n",
       "12178337                       8                            6.0   \n",
       "12178338                       8                            6.0   \n",
       "12178339                       8                            6.0   \n",
       "12178340                       8                            6.0   \n",
       "12178341                       8                            6.0   \n",
       "13541540                       8                            6.0   \n",
       "13541541                       8                            6.0   \n",
       "13541542                       8                            6.0   \n",
       "13541543                       8                            6.0   \n",
       "13541544                       8                            6.0   \n",
       "13541545                       8                            6.0   \n",
       "13541546                       8                            6.0   \n",
       "13541547                       8                            6.0   \n",
       "\n",
       "          BUREAU_NUMBER_OF_ACTIVE_LOANS  BUREAU_NUMBER_OF_SOLD_LOANS  \\\n",
       "6169431                             2.0                          0.0   \n",
       "6169432                             2.0                          0.0   \n",
       "6169433                             2.0                          0.0   \n",
       "6169434                             2.0                          0.0   \n",
       "6169435                             2.0                          0.0   \n",
       "6169436                             2.0                          0.0   \n",
       "6169437                             2.0                          0.0   \n",
       "6169438                             2.0                          0.0   \n",
       "6169439                             2.0                          0.0   \n",
       "6169440                             2.0                          0.0   \n",
       "6169441                             2.0                          0.0   \n",
       "6169442                             2.0                          0.0   \n",
       "6169443                             2.0                          0.0   \n",
       "6169444                             2.0                          0.0   \n",
       "6169445                             2.0                          0.0   \n",
       "6169446                             2.0                          0.0   \n",
       "6169447                             2.0                          0.0   \n",
       "6169448                             2.0                          0.0   \n",
       "6169449                             2.0                          0.0   \n",
       "6169450                             2.0                          0.0   \n",
       "6169451                             2.0                          0.0   \n",
       "6169452                             2.0                          0.0   \n",
       "6169453                             2.0                          0.0   \n",
       "6169454                             2.0                          0.0   \n",
       "6169455                             2.0                          0.0   \n",
       "6169456                             2.0                          0.0   \n",
       "6169457                             2.0                          0.0   \n",
       "6169458                             2.0                          0.0   \n",
       "6169459                             2.0                          0.0   \n",
       "6169460                             2.0                          0.0   \n",
       "...                                 ...                          ...   \n",
       "6169465                             2.0                          0.0   \n",
       "6169466                             2.0                          0.0   \n",
       "6169467                             2.0                          0.0   \n",
       "6169468                             2.0                          0.0   \n",
       "6169469                             2.0                          0.0   \n",
       "6169470                             2.0                          0.0   \n",
       "6169471                             2.0                          0.0   \n",
       "6169472                             2.0                          0.0   \n",
       "6169473                             2.0                          0.0   \n",
       "6169474                             2.0                          0.0   \n",
       "6169475                             2.0                          0.0   \n",
       "6169476                             2.0                          0.0   \n",
       "6169477                             2.0                          0.0   \n",
       "6169478                             2.0                          0.0   \n",
       "12178334                            2.0                          0.0   \n",
       "12178335                            2.0                          0.0   \n",
       "12178336                            2.0                          0.0   \n",
       "12178337                            2.0                          0.0   \n",
       "12178338                            2.0                          0.0   \n",
       "12178339                            2.0                          0.0   \n",
       "12178340                            2.0                          0.0   \n",
       "12178341                            2.0                          0.0   \n",
       "13541540                            2.0                          0.0   \n",
       "13541541                            2.0                          0.0   \n",
       "13541542                            2.0                          0.0   \n",
       "13541543                            2.0                          0.0   \n",
       "13541544                            2.0                          0.0   \n",
       "13541545                            2.0                          0.0   \n",
       "13541546                            2.0                          0.0   \n",
       "13541547                            2.0                          0.0   \n",
       "\n",
       "          BUREAU_NUMBER_OF_BAD DEBT_LOANS  DAYS_CREDIT_DIFF  \\\n",
       "6169431                               0.0                 0   \n",
       "6169432                               0.0               373   \n",
       "6169433                               0.0               169   \n",
       "6169434                               0.0               397   \n",
       "6169435                               0.0                 1   \n",
       "6169436                               0.0                78   \n",
       "6169437                               0.0                 4   \n",
       "6169438                               0.0               312   \n",
       "6169439                               0.0                 0   \n",
       "6169440                               0.0               373   \n",
       "6169441                               0.0               169   \n",
       "6169442                               0.0               397   \n",
       "6169443                               0.0                 1   \n",
       "6169444                               0.0                78   \n",
       "6169445                               0.0                 4   \n",
       "6169446                               0.0               312   \n",
       "6169447                               0.0                 0   \n",
       "6169448                               0.0               373   \n",
       "6169449                               0.0               169   \n",
       "6169450                               0.0               397   \n",
       "6169451                               0.0                 1   \n",
       "6169452                               0.0                78   \n",
       "6169453                               0.0                 4   \n",
       "6169454                               0.0               312   \n",
       "6169455                               0.0                 0   \n",
       "6169456                               0.0               373   \n",
       "6169457                               0.0               169   \n",
       "6169458                               0.0               397   \n",
       "6169459                               0.0                 1   \n",
       "6169460                               0.0                78   \n",
       "...                                   ...               ...   \n",
       "6169465                               0.0               169   \n",
       "6169466                               0.0               397   \n",
       "6169467                               0.0                 1   \n",
       "6169468                               0.0                78   \n",
       "6169469                               0.0                 4   \n",
       "6169470                               0.0               312   \n",
       "6169471                               0.0                 0   \n",
       "6169472                               0.0               373   \n",
       "6169473                               0.0               169   \n",
       "6169474                               0.0               397   \n",
       "6169475                               0.0                 1   \n",
       "6169476                               0.0                78   \n",
       "6169477                               0.0                 4   \n",
       "6169478                               0.0               312   \n",
       "12178334                              0.0                 0   \n",
       "12178335                              0.0               373   \n",
       "12178336                              0.0               169   \n",
       "12178337                              0.0               397   \n",
       "12178338                              0.0                 1   \n",
       "12178339                              0.0                78   \n",
       "12178340                              0.0                 4   \n",
       "12178341                              0.0               312   \n",
       "13541540                              0.0                 0   \n",
       "13541541                              0.0               373   \n",
       "13541542                              0.0               169   \n",
       "13541543                              0.0               397   \n",
       "13541544                              0.0                 1   \n",
       "13541545                              0.0                78   \n",
       "13541546                              0.0                 4   \n",
       "13541547                              0.0               312   \n",
       "\n",
       "          DAYS_CREDIT_DIFF_MEAN  \n",
       "6169431                  166.75  \n",
       "6169432                  166.75  \n",
       "6169433                  166.75  \n",
       "6169434                  166.75  \n",
       "6169435                  166.75  \n",
       "6169436                  166.75  \n",
       "6169437                  166.75  \n",
       "6169438                  166.75  \n",
       "6169439                  166.75  \n",
       "6169440                  166.75  \n",
       "6169441                  166.75  \n",
       "6169442                  166.75  \n",
       "6169443                  166.75  \n",
       "6169444                  166.75  \n",
       "6169445                  166.75  \n",
       "6169446                  166.75  \n",
       "6169447                  166.75  \n",
       "6169448                  166.75  \n",
       "6169449                  166.75  \n",
       "6169450                  166.75  \n",
       "6169451                  166.75  \n",
       "6169452                  166.75  \n",
       "6169453                  166.75  \n",
       "6169454                  166.75  \n",
       "6169455                  166.75  \n",
       "6169456                  166.75  \n",
       "6169457                  166.75  \n",
       "6169458                  166.75  \n",
       "6169459                  166.75  \n",
       "6169460                  166.75  \n",
       "...                         ...  \n",
       "6169465                  166.75  \n",
       "6169466                  166.75  \n",
       "6169467                  166.75  \n",
       "6169468                  166.75  \n",
       "6169469                  166.75  \n",
       "6169470                  166.75  \n",
       "6169471                  166.75  \n",
       "6169472                  166.75  \n",
       "6169473                  166.75  \n",
       "6169474                  166.75  \n",
       "6169475                  166.75  \n",
       "6169476                  166.75  \n",
       "6169477                  166.75  \n",
       "6169478                  166.75  \n",
       "12178334                 166.75  \n",
       "12178335                 166.75  \n",
       "12178336                 166.75  \n",
       "12178337                 166.75  \n",
       "12178338                 166.75  \n",
       "12178339                 166.75  \n",
       "12178340                 166.75  \n",
       "12178341                 166.75  \n",
       "13541540                 166.75  \n",
       "13541541                 166.75  \n",
       "13541542                 166.75  \n",
       "13541543                 166.75  \n",
       "13541544                 166.75  \n",
       "13541545                 166.75  \n",
       "13541546                 166.75  \n",
       "13541547                 166.75  \n",
       "\n",
       "[64 rows x 24 columns]"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 100002]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Numero total de dias do emprestimo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_BAD DEBT_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "      <th>DAYS_CREDIT_POSITIVE</th>\n",
       "      <th>TOTAL_OF_LOAN_DAYS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>160</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>65</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "0      215354       5714462        Closed      currency 1         -497   \n",
       "1      215354       5714462        Closed      currency 1         -497   \n",
       "2      215354       5714462        Closed      currency 1         -497   \n",
       "3      215354       5714462        Closed      currency 1         -497   \n",
       "4      215354       5714462        Closed      currency 1         -497   \n",
       "\n",
       "   CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "0                   0               -153.0             -153.0   \n",
       "1                   0               -153.0             -153.0   \n",
       "2                   0               -153.0             -153.0   \n",
       "3                   0               -153.0             -153.0   \n",
       "4                   0               -153.0             -153.0   \n",
       "\n",
       "   AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "0                     NaN                   0         91323.0   \n",
       "1                     NaN                   0         91323.0   \n",
       "2                     NaN                   0         91323.0   \n",
       "3                     NaN                   0         91323.0   \n",
       "4                     NaN                   0         91323.0   \n",
       "\n",
       "   AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "0                  0.0                   NaN                     0.0   \n",
       "1                  0.0                   NaN                     0.0   \n",
       "2                  0.0                   NaN                     0.0   \n",
       "3                  0.0                   NaN                     0.0   \n",
       "4                  0.0                   NaN                     0.0   \n",
       "\n",
       "       CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  BUREAU_NUMBER_OF_LOANS  \\\n",
       "0  Consumer credit                -131          NaN                      11   \n",
       "1  Consumer credit                -131          NaN                      11   \n",
       "2  Consumer credit                -131          NaN                      11   \n",
       "3  Consumer credit                -131          NaN                      11   \n",
       "4  Consumer credit                -131          NaN                      11   \n",
       "\n",
       "   BUREAU_NUMBER_OF_CLOSED_LOANS  BUREAU_NUMBER_OF_ACTIVE_LOANS  \\\n",
       "0                            5.0                            6.0   \n",
       "1                            5.0                            6.0   \n",
       "2                            5.0                            6.0   \n",
       "3                            5.0                            6.0   \n",
       "4                            5.0                            6.0   \n",
       "\n",
       "   BUREAU_NUMBER_OF_SOLD_LOANS  BUREAU_NUMBER_OF_BAD DEBT_LOANS  \\\n",
       "0                          0.0                              0.0   \n",
       "1                          0.0                              0.0   \n",
       "2                          0.0                              0.0   \n",
       "3                          0.0                              0.0   \n",
       "4                          0.0                              0.0   \n",
       "\n",
       "   DAYS_CREDIT_DIFF  DAYS_CREDIT_DIFF_MEAN  DAYS_CREDIT_POSITIVE  \\\n",
       "0                 0             166.272727                   497   \n",
       "1               160             166.272727                   497   \n",
       "2                 0             166.272727                   497   \n",
       "3                 5             166.272727                   497   \n",
       "4                65             166.272727                   497   \n",
       "\n",
       "   TOTAL_OF_LOAN_DAYS  \n",
       "0               344.0  \n",
       "1               344.0  \n",
       "2               344.0  \n",
       "3               344.0  \n",
       "4               344.0  "
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = bureau_full_df\n",
    "x['DAYS_CREDIT_ENDDATE'] = x['DAYS_CREDIT_ENDDATE'].fillna(0)\n",
    "x['DAYS_CREDIT_POSITIVE'] = x['DAYS_CREDIT'] * -1\n",
    "bureau_full_df['TOTAL_OF_LOAN_DAYS'] = x['DAYS_CREDIT_POSITIVE'] + x['DAYS_CREDIT_ENDDATE']\n",
    "bureau_full_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_BAD DEBT_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "      <th>DAYS_CREDIT_POSITIVE</th>\n",
       "      <th>TOTAL_OF_LOAN_DAYS</th>\n",
       "      <th>MEAN_OF_LOAN_DAYS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>3169.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>160</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>3169.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>3169.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>3169.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>65</td>\n",
       "      <td>166.272727</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>3169.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "0      215354       5714462        Closed      currency 1         -497   \n",
       "1      215354       5714462        Closed      currency 1         -497   \n",
       "2      215354       5714462        Closed      currency 1         -497   \n",
       "3      215354       5714462        Closed      currency 1         -497   \n",
       "4      215354       5714462        Closed      currency 1         -497   \n",
       "\n",
       "   CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "0                   0               -153.0             -153.0   \n",
       "1                   0               -153.0             -153.0   \n",
       "2                   0               -153.0             -153.0   \n",
       "3                   0               -153.0             -153.0   \n",
       "4                   0               -153.0             -153.0   \n",
       "\n",
       "   AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "0                     NaN                   0         91323.0   \n",
       "1                     NaN                   0         91323.0   \n",
       "2                     NaN                   0         91323.0   \n",
       "3                     NaN                   0         91323.0   \n",
       "4                     NaN                   0         91323.0   \n",
       "\n",
       "   AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "0                  0.0                   NaN                     0.0   \n",
       "1                  0.0                   NaN                     0.0   \n",
       "2                  0.0                   NaN                     0.0   \n",
       "3                  0.0                   NaN                     0.0   \n",
       "4                  0.0                   NaN                     0.0   \n",
       "\n",
       "       CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  BUREAU_NUMBER_OF_LOANS  \\\n",
       "0  Consumer credit                -131          NaN                      11   \n",
       "1  Consumer credit                -131          NaN                      11   \n",
       "2  Consumer credit                -131          NaN                      11   \n",
       "3  Consumer credit                -131          NaN                      11   \n",
       "4  Consumer credit                -131          NaN                      11   \n",
       "\n",
       "   BUREAU_NUMBER_OF_CLOSED_LOANS  BUREAU_NUMBER_OF_ACTIVE_LOANS  \\\n",
       "0                            5.0                            6.0   \n",
       "1                            5.0                            6.0   \n",
       "2                            5.0                            6.0   \n",
       "3                            5.0                            6.0   \n",
       "4                            5.0                            6.0   \n",
       "\n",
       "   BUREAU_NUMBER_OF_SOLD_LOANS  BUREAU_NUMBER_OF_BAD DEBT_LOANS  \\\n",
       "0                          0.0                              0.0   \n",
       "1                          0.0                              0.0   \n",
       "2                          0.0                              0.0   \n",
       "3                          0.0                              0.0   \n",
       "4                          0.0                              0.0   \n",
       "\n",
       "   DAYS_CREDIT_DIFF  DAYS_CREDIT_DIFF_MEAN  DAYS_CREDIT_POSITIVE  \\\n",
       "0                 0             166.272727                   497   \n",
       "1               160             166.272727                   497   \n",
       "2                 0             166.272727                   497   \n",
       "3                 5             166.272727                   497   \n",
       "4                65             166.272727                   497   \n",
       "\n",
       "   TOTAL_OF_LOAN_DAYS  MEAN_OF_LOAN_DAYS  \n",
       "0               344.0             3169.0  \n",
       "1               344.0             3169.0  \n",
       "2               344.0             3169.0  \n",
       "3               344.0             3169.0  \n",
       "4               344.0             3169.0  "
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Qual o tempo medio entre os emprestimos realizados?\n",
    "x = bureau_full_df[['SK_ID_CURR', 'TOTAL_OF_LOAN_DAYS']].groupby(by = ['SK_ID_CURR'])['TOTAL_OF_LOAN_DAYS'].mean()\n",
    "x = x.to_frame().reset_index().rename(index=str, columns={'TOTAL_OF_LOAN_DAYS': 'MEAN_OF_LOAN_DAYS'})\n",
    "bureau_full_df = bureau_full_df.merge(x, on=['SK_ID_CURR'], how='left')\n",
    "bureau_full_df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Existem dois ou mais pedidos de empréstimo ao mesmo tempo?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Existem créditos atrasados (CREDIT_DAY_OVERDUE)?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Gravando nova tabela em CSV para ser usada no modelo externo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "application_train_df = pd.read_csv('dataset/application_train.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "features = ['SK_ID_CURR',  'BUREAU_NUMBER_OF_LOANS', 'BUREAU_NUMBER_OF_CLOSED_LOANS', 'BUREAU_NUMBER_OF_ACTIVE_LOANS', 'BUREAU_NUMBER_OF_SOLD_LOANS', 'DAYS_CREDIT_DIFF_MEAN', 'MEAN_OF_LOAN_DAYS']\n",
    "b = bureau_full_df[features].drop_duplicates().reset_index()\n",
    "b.to_csv('dataset/bureau_processed.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>NAME_CONTRACT_TYPE</th>\n",
       "      <th>CODE_GENDER</th>\n",
       "      <th>FLAG_OWN_CAR</th>\n",
       "      <th>FLAG_OWN_REALTY</th>\n",
       "      <th>CNT_CHILDREN</th>\n",
       "      <th>AMT_INCOME_TOTAL</th>\n",
       "      <th>AMT_CREDIT</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>AMT_GOODS_PRICE</th>\n",
       "      <th>NAME_TYPE_SUITE</th>\n",
       "      <th>NAME_INCOME_TYPE</th>\n",
       "      <th>NAME_EDUCATION_TYPE</th>\n",
       "      <th>NAME_FAMILY_STATUS</th>\n",
       "      <th>NAME_HOUSING_TYPE</th>\n",
       "      <th>REGION_POPULATION_RELATIVE</th>\n",
       "      <th>DAYS_BIRTH</th>\n",
       "      <th>DAYS_EMPLOYED</th>\n",
       "      <th>DAYS_REGISTRATION</th>\n",
       "      <th>DAYS_ID_PUBLISH</th>\n",
       "      <th>OWN_CAR_AGE</th>\n",
       "      <th>FLAG_MOBIL</th>\n",
       "      <th>FLAG_EMP_PHONE</th>\n",
       "      <th>FLAG_WORK_PHONE</th>\n",
       "      <th>FLAG_CONT_MOBILE</th>\n",
       "      <th>FLAG_PHONE</th>\n",
       "      <th>FLAG_EMAIL</th>\n",
       "      <th>OCCUPATION_TYPE</th>\n",
       "      <th>CNT_FAM_MEMBERS</th>\n",
       "      <th>REGION_RATING_CLIENT</th>\n",
       "      <th>REGION_RATING_CLIENT_W_CITY</th>\n",
       "      <th>WEEKDAY_APPR_PROCESS_START</th>\n",
       "      <th>HOUR_APPR_PROCESS_START</th>\n",
       "      <th>REG_REGION_NOT_LIVE_REGION</th>\n",
       "      <th>REG_REGION_NOT_WORK_REGION</th>\n",
       "      <th>LIVE_REGION_NOT_WORK_REGION</th>\n",
       "      <th>REG_CITY_NOT_LIVE_CITY</th>\n",
       "      <th>REG_CITY_NOT_WORK_CITY</th>\n",
       "      <th>LIVE_CITY_NOT_WORK_CITY</th>\n",
       "      <th>ORGANIZATION_TYPE</th>\n",
       "      <th>EXT_SOURCE_1</th>\n",
       "      <th>EXT_SOURCE_2</th>\n",
       "      <th>EXT_SOURCE_3</th>\n",
       "      <th>APARTMENTS_AVG</th>\n",
       "      <th>BASEMENTAREA_AVG</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_AVG</th>\n",
       "      <th>YEARS_BUILD_AVG</th>\n",
       "      <th>COMMONAREA_AVG</th>\n",
       "      <th>ELEVATORS_AVG</th>\n",
       "      <th>ENTRANCES_AVG</th>\n",
       "      <th>FLOORSMAX_AVG</th>\n",
       "      <th>FLOORSMIN_AVG</th>\n",
       "      <th>LANDAREA_AVG</th>\n",
       "      <th>LIVINGAPARTMENTS_AVG</th>\n",
       "      <th>LIVINGAREA_AVG</th>\n",
       "      <th>NONLIVINGAPARTMENTS_AVG</th>\n",
       "      <th>NONLIVINGAREA_AVG</th>\n",
       "      <th>APARTMENTS_MODE</th>\n",
       "      <th>BASEMENTAREA_MODE</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MODE</th>\n",
       "      <th>YEARS_BUILD_MODE</th>\n",
       "      <th>COMMONAREA_MODE</th>\n",
       "      <th>ELEVATORS_MODE</th>\n",
       "      <th>ENTRANCES_MODE</th>\n",
       "      <th>FLOORSMAX_MODE</th>\n",
       "      <th>FLOORSMIN_MODE</th>\n",
       "      <th>LANDAREA_MODE</th>\n",
       "      <th>LIVINGAPARTMENTS_MODE</th>\n",
       "      <th>LIVINGAREA_MODE</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MODE</th>\n",
       "      <th>NONLIVINGAREA_MODE</th>\n",
       "      <th>APARTMENTS_MEDI</th>\n",
       "      <th>BASEMENTAREA_MEDI</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MEDI</th>\n",
       "      <th>YEARS_BUILD_MEDI</th>\n",
       "      <th>COMMONAREA_MEDI</th>\n",
       "      <th>ELEVATORS_MEDI</th>\n",
       "      <th>ENTRANCES_MEDI</th>\n",
       "      <th>FLOORSMAX_MEDI</th>\n",
       "      <th>FLOORSMIN_MEDI</th>\n",
       "      <th>LANDAREA_MEDI</th>\n",
       "      <th>LIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>LIVINGAREA_MEDI</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>NONLIVINGAREA_MEDI</th>\n",
       "      <th>FONDKAPREMONT_MODE</th>\n",
       "      <th>HOUSETYPE_MODE</th>\n",
       "      <th>TOTALAREA_MODE</th>\n",
       "      <th>WALLSMATERIAL_MODE</th>\n",
       "      <th>EMERGENCYSTATE_MODE</th>\n",
       "      <th>OBS_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>OBS_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DAYS_LAST_PHONE_CHANGE</th>\n",
       "      <th>FLAG_DOCUMENT_2</th>\n",
       "      <th>FLAG_DOCUMENT_3</th>\n",
       "      <th>FLAG_DOCUMENT_4</th>\n",
       "      <th>FLAG_DOCUMENT_5</th>\n",
       "      <th>FLAG_DOCUMENT_6</th>\n",
       "      <th>FLAG_DOCUMENT_7</th>\n",
       "      <th>FLAG_DOCUMENT_8</th>\n",
       "      <th>FLAG_DOCUMENT_9</th>\n",
       "      <th>FLAG_DOCUMENT_10</th>\n",
       "      <th>FLAG_DOCUMENT_11</th>\n",
       "      <th>FLAG_DOCUMENT_12</th>\n",
       "      <th>FLAG_DOCUMENT_13</th>\n",
       "      <th>FLAG_DOCUMENT_14</th>\n",
       "      <th>FLAG_DOCUMENT_15</th>\n",
       "      <th>FLAG_DOCUMENT_16</th>\n",
       "      <th>FLAG_DOCUMENT_17</th>\n",
       "      <th>FLAG_DOCUMENT_18</th>\n",
       "      <th>FLAG_DOCUMENT_19</th>\n",
       "      <th>FLAG_DOCUMENT_20</th>\n",
       "      <th>FLAG_DOCUMENT_21</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_HOUR</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_DAY</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_WEEK</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_MON</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_QRT</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_YEAR</th>\n",
       "      <th>index</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "      <th>MEAN_OF_LOAN_DAYS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100002</td>\n",
       "      <td>1</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>202500.0</td>\n",
       "      <td>406597.5</td>\n",
       "      <td>24700.5</td>\n",
       "      <td>351000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.018801</td>\n",
       "      <td>-9461</td>\n",
       "      <td>-637</td>\n",
       "      <td>-3648.0</td>\n",
       "      <td>-2120</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>0.083037</td>\n",
       "      <td>0.262949</td>\n",
       "      <td>0.139376</td>\n",
       "      <td>0.0247</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6192</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.0202</td>\n",
       "      <td>0.0190</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0252</td>\n",
       "      <td>0.0383</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6341</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0377</td>\n",
       "      <td>0.022</td>\n",
       "      <td>0.0198</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6243</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0375</td>\n",
       "      <td>0.0205</td>\n",
       "      <td>0.0193</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0149</td>\n",
       "      <td>Stone, brick</td>\n",
       "      <td>No</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-1134.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6169431.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>166.75</td>\n",
       "      <td>612.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100003</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>N</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>1293502.5</td>\n",
       "      <td>35698.5</td>\n",
       "      <td>1129500.0</td>\n",
       "      <td>Family</td>\n",
       "      <td>State servant</td>\n",
       "      <td>Higher education</td>\n",
       "      <td>Married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.003541</td>\n",
       "      <td>-16765</td>\n",
       "      <td>-1188</td>\n",
       "      <td>-1186.0</td>\n",
       "      <td>-291</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>School</td>\n",
       "      <td>0.311267</td>\n",
       "      <td>0.622246</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0959</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7960</td>\n",
       "      <td>0.0605</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0130</td>\n",
       "      <td>0.0773</td>\n",
       "      <td>0.0549</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0098</td>\n",
       "      <td>0.0924</td>\n",
       "      <td>0.0538</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.8040</td>\n",
       "      <td>0.0497</td>\n",
       "      <td>0.0806</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0128</td>\n",
       "      <td>0.079</td>\n",
       "      <td>0.0554</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0968</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7987</td>\n",
       "      <td>0.0608</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0132</td>\n",
       "      <td>0.0787</td>\n",
       "      <td>0.0558</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.01</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0714</td>\n",
       "      <td>Block</td>\n",
       "      <td>No</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-828.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9351490.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>495.00</td>\n",
       "      <td>856.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100004</td>\n",
       "      <td>0</td>\n",
       "      <td>Revolving loans</td>\n",
       "      <td>M</td>\n",
       "      <td>Y</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>6750.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.010032</td>\n",
       "      <td>-19046</td>\n",
       "      <td>-225</td>\n",
       "      <td>-4260.0</td>\n",
       "      <td>-2531</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Government</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.555912</td>\n",
       "      <td>0.729567</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-815.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3317022.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>459.00</td>\n",
       "      <td>378.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100006</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>312682.5</td>\n",
       "      <td>29686.5</td>\n",
       "      <td>297000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Civil marriage</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.008019</td>\n",
       "      <td>-19005</td>\n",
       "      <td>-3039</td>\n",
       "      <td>-9833.0</td>\n",
       "      <td>-2437</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.650442</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-617.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100007</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>121500.0</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>21865.5</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.028663</td>\n",
       "      <td>-19932</td>\n",
       "      <td>-3038</td>\n",
       "      <td>-4311.0</td>\n",
       "      <td>-3458</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>THURSDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Religion</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.322738</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1106.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>13701533.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>366.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  TARGET NAME_CONTRACT_TYPE CODE_GENDER FLAG_OWN_CAR  \\\n",
       "0      100002       1         Cash loans           M            N   \n",
       "1      100003       0         Cash loans           F            N   \n",
       "2      100004       0    Revolving loans           M            Y   \n",
       "3      100006       0         Cash loans           F            N   \n",
       "4      100007       0         Cash loans           M            N   \n",
       "\n",
       "  FLAG_OWN_REALTY  CNT_CHILDREN  AMT_INCOME_TOTAL  AMT_CREDIT  AMT_ANNUITY  \\\n",
       "0               Y             0          202500.0    406597.5      24700.5   \n",
       "1               N             0          270000.0   1293502.5      35698.5   \n",
       "2               Y             0           67500.0    135000.0       6750.0   \n",
       "3               Y             0          135000.0    312682.5      29686.5   \n",
       "4               Y             0          121500.0    513000.0      21865.5   \n",
       "\n",
       "   AMT_GOODS_PRICE NAME_TYPE_SUITE NAME_INCOME_TYPE  \\\n",
       "0         351000.0   Unaccompanied          Working   \n",
       "1        1129500.0          Family    State servant   \n",
       "2         135000.0   Unaccompanied          Working   \n",
       "3         297000.0   Unaccompanied          Working   \n",
       "4         513000.0   Unaccompanied          Working   \n",
       "\n",
       "             NAME_EDUCATION_TYPE    NAME_FAMILY_STATUS  NAME_HOUSING_TYPE  \\\n",
       "0  Secondary / secondary special  Single / not married  House / apartment   \n",
       "1               Higher education               Married  House / apartment   \n",
       "2  Secondary / secondary special  Single / not married  House / apartment   \n",
       "3  Secondary / secondary special        Civil marriage  House / apartment   \n",
       "4  Secondary / secondary special  Single / not married  House / apartment   \n",
       "\n",
       "   REGION_POPULATION_RELATIVE  DAYS_BIRTH  DAYS_EMPLOYED  DAYS_REGISTRATION  \\\n",
       "0                    0.018801       -9461           -637            -3648.0   \n",
       "1                    0.003541      -16765          -1188            -1186.0   \n",
       "2                    0.010032      -19046           -225            -4260.0   \n",
       "3                    0.008019      -19005          -3039            -9833.0   \n",
       "4                    0.028663      -19932          -3038            -4311.0   \n",
       "\n",
       "   DAYS_ID_PUBLISH  OWN_CAR_AGE  FLAG_MOBIL  FLAG_EMP_PHONE  FLAG_WORK_PHONE  \\\n",
       "0            -2120          NaN           1               1                0   \n",
       "1             -291          NaN           1               1                0   \n",
       "2            -2531         26.0           1               1                1   \n",
       "3            -2437          NaN           1               1                0   \n",
       "4            -3458          NaN           1               1                0   \n",
       "\n",
       "   FLAG_CONT_MOBILE  FLAG_PHONE  FLAG_EMAIL OCCUPATION_TYPE  CNT_FAM_MEMBERS  \\\n",
       "0                 1           1           0        Laborers              1.0   \n",
       "1                 1           1           0      Core staff              2.0   \n",
       "2                 1           1           0        Laborers              1.0   \n",
       "3                 1           0           0        Laborers              2.0   \n",
       "4                 1           0           0      Core staff              1.0   \n",
       "\n",
       "   REGION_RATING_CLIENT  REGION_RATING_CLIENT_W_CITY  \\\n",
       "0                     2                            2   \n",
       "1                     1                            1   \n",
       "2                     2                            2   \n",
       "3                     2                            2   \n",
       "4                     2                            2   \n",
       "\n",
       "  WEEKDAY_APPR_PROCESS_START  HOUR_APPR_PROCESS_START  \\\n",
       "0                  WEDNESDAY                       10   \n",
       "1                     MONDAY                       11   \n",
       "2                     MONDAY                        9   \n",
       "3                  WEDNESDAY                       17   \n",
       "4                   THURSDAY                       11   \n",
       "\n",
       "   REG_REGION_NOT_LIVE_REGION  REG_REGION_NOT_WORK_REGION  \\\n",
       "0                           0                           0   \n",
       "1                           0                           0   \n",
       "2                           0                           0   \n",
       "3                           0                           0   \n",
       "4                           0                           0   \n",
       "\n",
       "   LIVE_REGION_NOT_WORK_REGION  REG_CITY_NOT_LIVE_CITY  \\\n",
       "0                            0                       0   \n",
       "1                            0                       0   \n",
       "2                            0                       0   \n",
       "3                            0                       0   \n",
       "4                            0                       0   \n",
       "\n",
       "   REG_CITY_NOT_WORK_CITY  LIVE_CITY_NOT_WORK_CITY       ORGANIZATION_TYPE  \\\n",
       "0                       0                        0  Business Entity Type 3   \n",
       "1                       0                        0                  School   \n",
       "2                       0                        0              Government   \n",
       "3                       0                        0  Business Entity Type 3   \n",
       "4                       1                        1                Religion   \n",
       "\n",
       "   EXT_SOURCE_1  EXT_SOURCE_2  EXT_SOURCE_3  APARTMENTS_AVG  BASEMENTAREA_AVG  \\\n",
       "0      0.083037      0.262949      0.139376          0.0247            0.0369   \n",
       "1      0.311267      0.622246           NaN          0.0959            0.0529   \n",
       "2           NaN      0.555912      0.729567             NaN               NaN   \n",
       "3           NaN      0.650442           NaN             NaN               NaN   \n",
       "4           NaN      0.322738           NaN             NaN               NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_AVG  YEARS_BUILD_AVG  COMMONAREA_AVG  \\\n",
       "0                       0.9722           0.6192          0.0143   \n",
       "1                       0.9851           0.7960          0.0605   \n",
       "2                          NaN              NaN             NaN   \n",
       "3                          NaN              NaN             NaN   \n",
       "4                          NaN              NaN             NaN   \n",
       "\n",
       "   ELEVATORS_AVG  ENTRANCES_AVG  FLOORSMAX_AVG  FLOORSMIN_AVG  LANDAREA_AVG  \\\n",
       "0           0.00         0.0690         0.0833         0.1250        0.0369   \n",
       "1           0.08         0.0345         0.2917         0.3333        0.0130   \n",
       "2            NaN            NaN            NaN            NaN           NaN   \n",
       "3            NaN            NaN            NaN            NaN           NaN   \n",
       "4            NaN            NaN            NaN            NaN           NaN   \n",
       "\n",
       "   LIVINGAPARTMENTS_AVG  LIVINGAREA_AVG  NONLIVINGAPARTMENTS_AVG  \\\n",
       "0                0.0202          0.0190                   0.0000   \n",
       "1                0.0773          0.0549                   0.0039   \n",
       "2                   NaN             NaN                      NaN   \n",
       "3                   NaN             NaN                      NaN   \n",
       "4                   NaN             NaN                      NaN   \n",
       "\n",
       "   NONLIVINGAREA_AVG  APARTMENTS_MODE  BASEMENTAREA_MODE  \\\n",
       "0             0.0000           0.0252             0.0383   \n",
       "1             0.0098           0.0924             0.0538   \n",
       "2                NaN              NaN                NaN   \n",
       "3                NaN              NaN                NaN   \n",
       "4                NaN              NaN                NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_MODE  YEARS_BUILD_MODE  COMMONAREA_MODE  \\\n",
       "0                        0.9722            0.6341           0.0144   \n",
       "1                        0.9851            0.8040           0.0497   \n",
       "2                           NaN               NaN              NaN   \n",
       "3                           NaN               NaN              NaN   \n",
       "4                           NaN               NaN              NaN   \n",
       "\n",
       "   ELEVATORS_MODE  ENTRANCES_MODE  FLOORSMAX_MODE  FLOORSMIN_MODE  \\\n",
       "0          0.0000          0.0690          0.0833          0.1250   \n",
       "1          0.0806          0.0345          0.2917          0.3333   \n",
       "2             NaN             NaN             NaN             NaN   \n",
       "3             NaN             NaN             NaN             NaN   \n",
       "4             NaN             NaN             NaN             NaN   \n",
       "\n",
       "   LANDAREA_MODE  LIVINGAPARTMENTS_MODE  LIVINGAREA_MODE  \\\n",
       "0         0.0377                  0.022           0.0198   \n",
       "1         0.0128                  0.079           0.0554   \n",
       "2            NaN                    NaN              NaN   \n",
       "3            NaN                    NaN              NaN   \n",
       "4            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MODE  NONLIVINGAREA_MODE  APARTMENTS_MEDI  \\\n",
       "0                       0.0                 0.0           0.0250   \n",
       "1                       0.0                 0.0           0.0968   \n",
       "2                       NaN                 NaN              NaN   \n",
       "3                       NaN                 NaN              NaN   \n",
       "4                       NaN                 NaN              NaN   \n",
       "\n",
       "   BASEMENTAREA_MEDI  YEARS_BEGINEXPLUATATION_MEDI  YEARS_BUILD_MEDI  \\\n",
       "0             0.0369                        0.9722            0.6243   \n",
       "1             0.0529                        0.9851            0.7987   \n",
       "2                NaN                           NaN               NaN   \n",
       "3                NaN                           NaN               NaN   \n",
       "4                NaN                           NaN               NaN   \n",
       "\n",
       "   COMMONAREA_MEDI  ELEVATORS_MEDI  ENTRANCES_MEDI  FLOORSMAX_MEDI  \\\n",
       "0           0.0144            0.00          0.0690          0.0833   \n",
       "1           0.0608            0.08          0.0345          0.2917   \n",
       "2              NaN             NaN             NaN             NaN   \n",
       "3              NaN             NaN             NaN             NaN   \n",
       "4              NaN             NaN             NaN             NaN   \n",
       "\n",
       "   FLOORSMIN_MEDI  LANDAREA_MEDI  LIVINGAPARTMENTS_MEDI  LIVINGAREA_MEDI  \\\n",
       "0          0.1250         0.0375                 0.0205           0.0193   \n",
       "1          0.3333         0.0132                 0.0787           0.0558   \n",
       "2             NaN            NaN                    NaN              NaN   \n",
       "3             NaN            NaN                    NaN              NaN   \n",
       "4             NaN            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MEDI  NONLIVINGAREA_MEDI FONDKAPREMONT_MODE  \\\n",
       "0                    0.0000                0.00   reg oper account   \n",
       "1                    0.0039                0.01   reg oper account   \n",
       "2                       NaN                 NaN                NaN   \n",
       "3                       NaN                 NaN                NaN   \n",
       "4                       NaN                 NaN                NaN   \n",
       "\n",
       "   HOUSETYPE_MODE  TOTALAREA_MODE WALLSMATERIAL_MODE EMERGENCYSTATE_MODE  \\\n",
       "0  block of flats          0.0149       Stone, brick                  No   \n",
       "1  block of flats          0.0714              Block                  No   \n",
       "2             NaN             NaN                NaN                 NaN   \n",
       "3             NaN             NaN                NaN                 NaN   \n",
       "4             NaN             NaN                NaN                 NaN   \n",
       "\n",
       "   OBS_30_CNT_SOCIAL_CIRCLE  DEF_30_CNT_SOCIAL_CIRCLE  \\\n",
       "0                       2.0                       2.0   \n",
       "1                       1.0                       0.0   \n",
       "2                       0.0                       0.0   \n",
       "3                       2.0                       0.0   \n",
       "4                       0.0                       0.0   \n",
       "\n",
       "   OBS_60_CNT_SOCIAL_CIRCLE  DEF_60_CNT_SOCIAL_CIRCLE  DAYS_LAST_PHONE_CHANGE  \\\n",
       "0                       2.0                       2.0                 -1134.0   \n",
       "1                       1.0                       0.0                  -828.0   \n",
       "2                       0.0                       0.0                  -815.0   \n",
       "3                       2.0                       0.0                  -617.0   \n",
       "4                       0.0                       0.0                 -1106.0   \n",
       "\n",
       "   FLAG_DOCUMENT_2  FLAG_DOCUMENT_3  FLAG_DOCUMENT_4  FLAG_DOCUMENT_5  \\\n",
       "0                0                1                0                0   \n",
       "1                0                1                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                1                0                0   \n",
       "4                0                0                0                0   \n",
       "\n",
       "   FLAG_DOCUMENT_6  FLAG_DOCUMENT_7  FLAG_DOCUMENT_8  FLAG_DOCUMENT_9  \\\n",
       "0                0                0                0                0   \n",
       "1                0                0                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                0                0                0   \n",
       "4                0                0                1                0   \n",
       "\n",
       "   FLAG_DOCUMENT_10  FLAG_DOCUMENT_11  FLAG_DOCUMENT_12  FLAG_DOCUMENT_13  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_14  FLAG_DOCUMENT_15  FLAG_DOCUMENT_16  FLAG_DOCUMENT_17  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_18  FLAG_DOCUMENT_19  FLAG_DOCUMENT_20  FLAG_DOCUMENT_21  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_HOUR  AMT_REQ_CREDIT_BUREAU_DAY  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_WEEK  AMT_REQ_CREDIT_BUREAU_MON  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_QRT  AMT_REQ_CREDIT_BUREAU_YEAR       index  \\\n",
       "0                        0.0                         1.0   6169431.0   \n",
       "1                        0.0                         0.0   9351490.0   \n",
       "2                        0.0                         0.0   3317022.0   \n",
       "3                        NaN                         NaN         NaN   \n",
       "4                        0.0                         0.0  13701533.0   \n",
       "\n",
       "   BUREAU_NUMBER_OF_LOANS  BUREAU_NUMBER_OF_CLOSED_LOANS  \\\n",
       "0                     8.0                            6.0   \n",
       "1                     4.0                            3.0   \n",
       "2                     2.0                            2.0   \n",
       "3                     NaN                            NaN   \n",
       "4                     1.0                            1.0   \n",
       "\n",
       "   BUREAU_NUMBER_OF_ACTIVE_LOANS  BUREAU_NUMBER_OF_SOLD_LOANS  \\\n",
       "0                            2.0                          0.0   \n",
       "1                            1.0                          0.0   \n",
       "2                            0.0                          0.0   \n",
       "3                            NaN                          NaN   \n",
       "4                            0.0                          0.0   \n",
       "\n",
       "   DAYS_CREDIT_DIFF_MEAN  MEAN_OF_LOAN_DAYS  \n",
       "0                 166.75             612.25  \n",
       "1                 495.00             856.25  \n",
       "2                 459.00             378.50  \n",
       "3                    NaN                NaN  \n",
       "4                   0.00             366.00  "
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = application_train_df.merge(right=b, on=['SK_ID_CURR'], how='left')\n",
    "x.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_BAD DEBT_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "      <th>DAYS_CREDIT_POSITIVE</th>\n",
       "      <th>TOTAL_OF_LOAN_DAYS</th>\n",
       "      <th>MEAN_OF_LOAN_DAYS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [SK_ID_CURR, SK_ID_BUREAU, CREDIT_ACTIVE, CREDIT_CURRENCY, DAYS_CREDIT, CREDIT_DAY_OVERDUE, DAYS_CREDIT_ENDDATE, DAYS_ENDDATE_FACT, AMT_CREDIT_MAX_OVERDUE, CNT_CREDIT_PROLONG, AMT_CREDIT_SUM, AMT_CREDIT_SUM_DEBT, AMT_CREDIT_SUM_LIMIT, AMT_CREDIT_SUM_OVERDUE, CREDIT_TYPE, DAYS_CREDIT_UPDATE, AMT_ANNUITY, BUREAU_NUMBER_OF_LOANS, BUREAU_NUMBER_OF_CLOSED_LOANS, BUREAU_NUMBER_OF_ACTIVE_LOANS, BUREAU_NUMBER_OF_SOLD_LOANS, BUREAU_NUMBER_OF_BAD DEBT_LOANS, DAYS_CREDIT_DIFF, DAYS_CREDIT_DIFF_MEAN, DAYS_CREDIT_POSITIVE, TOTAL_OF_LOAN_DAYS, MEAN_OF_LOAN_DAYS]\n",
       "Index: []"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_CURR == 100006]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>NAME_CONTRACT_TYPE</th>\n",
       "      <th>CODE_GENDER</th>\n",
       "      <th>FLAG_OWN_CAR</th>\n",
       "      <th>FLAG_OWN_REALTY</th>\n",
       "      <th>CNT_CHILDREN</th>\n",
       "      <th>AMT_INCOME_TOTAL</th>\n",
       "      <th>AMT_CREDIT</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>AMT_GOODS_PRICE</th>\n",
       "      <th>NAME_TYPE_SUITE</th>\n",
       "      <th>NAME_INCOME_TYPE</th>\n",
       "      <th>NAME_EDUCATION_TYPE</th>\n",
       "      <th>NAME_FAMILY_STATUS</th>\n",
       "      <th>NAME_HOUSING_TYPE</th>\n",
       "      <th>REGION_POPULATION_RELATIVE</th>\n",
       "      <th>DAYS_BIRTH</th>\n",
       "      <th>DAYS_EMPLOYED</th>\n",
       "      <th>DAYS_REGISTRATION</th>\n",
       "      <th>DAYS_ID_PUBLISH</th>\n",
       "      <th>OWN_CAR_AGE</th>\n",
       "      <th>FLAG_MOBIL</th>\n",
       "      <th>FLAG_EMP_PHONE</th>\n",
       "      <th>FLAG_WORK_PHONE</th>\n",
       "      <th>FLAG_CONT_MOBILE</th>\n",
       "      <th>FLAG_PHONE</th>\n",
       "      <th>FLAG_EMAIL</th>\n",
       "      <th>OCCUPATION_TYPE</th>\n",
       "      <th>CNT_FAM_MEMBERS</th>\n",
       "      <th>REGION_RATING_CLIENT</th>\n",
       "      <th>REGION_RATING_CLIENT_W_CITY</th>\n",
       "      <th>WEEKDAY_APPR_PROCESS_START</th>\n",
       "      <th>HOUR_APPR_PROCESS_START</th>\n",
       "      <th>REG_REGION_NOT_LIVE_REGION</th>\n",
       "      <th>REG_REGION_NOT_WORK_REGION</th>\n",
       "      <th>LIVE_REGION_NOT_WORK_REGION</th>\n",
       "      <th>REG_CITY_NOT_LIVE_CITY</th>\n",
       "      <th>REG_CITY_NOT_WORK_CITY</th>\n",
       "      <th>LIVE_CITY_NOT_WORK_CITY</th>\n",
       "      <th>ORGANIZATION_TYPE</th>\n",
       "      <th>EXT_SOURCE_1</th>\n",
       "      <th>EXT_SOURCE_2</th>\n",
       "      <th>EXT_SOURCE_3</th>\n",
       "      <th>APARTMENTS_AVG</th>\n",
       "      <th>BASEMENTAREA_AVG</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_AVG</th>\n",
       "      <th>YEARS_BUILD_AVG</th>\n",
       "      <th>COMMONAREA_AVG</th>\n",
       "      <th>ELEVATORS_AVG</th>\n",
       "      <th>ENTRANCES_AVG</th>\n",
       "      <th>FLOORSMAX_AVG</th>\n",
       "      <th>FLOORSMIN_AVG</th>\n",
       "      <th>LANDAREA_AVG</th>\n",
       "      <th>LIVINGAPARTMENTS_AVG</th>\n",
       "      <th>LIVINGAREA_AVG</th>\n",
       "      <th>NONLIVINGAPARTMENTS_AVG</th>\n",
       "      <th>NONLIVINGAREA_AVG</th>\n",
       "      <th>APARTMENTS_MODE</th>\n",
       "      <th>BASEMENTAREA_MODE</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MODE</th>\n",
       "      <th>YEARS_BUILD_MODE</th>\n",
       "      <th>COMMONAREA_MODE</th>\n",
       "      <th>ELEVATORS_MODE</th>\n",
       "      <th>ENTRANCES_MODE</th>\n",
       "      <th>FLOORSMAX_MODE</th>\n",
       "      <th>FLOORSMIN_MODE</th>\n",
       "      <th>LANDAREA_MODE</th>\n",
       "      <th>LIVINGAPARTMENTS_MODE</th>\n",
       "      <th>LIVINGAREA_MODE</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MODE</th>\n",
       "      <th>NONLIVINGAREA_MODE</th>\n",
       "      <th>APARTMENTS_MEDI</th>\n",
       "      <th>BASEMENTAREA_MEDI</th>\n",
       "      <th>YEARS_BEGINEXPLUATATION_MEDI</th>\n",
       "      <th>YEARS_BUILD_MEDI</th>\n",
       "      <th>COMMONAREA_MEDI</th>\n",
       "      <th>ELEVATORS_MEDI</th>\n",
       "      <th>ENTRANCES_MEDI</th>\n",
       "      <th>FLOORSMAX_MEDI</th>\n",
       "      <th>FLOORSMIN_MEDI</th>\n",
       "      <th>LANDAREA_MEDI</th>\n",
       "      <th>LIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>LIVINGAREA_MEDI</th>\n",
       "      <th>NONLIVINGAPARTMENTS_MEDI</th>\n",
       "      <th>NONLIVINGAREA_MEDI</th>\n",
       "      <th>FONDKAPREMONT_MODE</th>\n",
       "      <th>HOUSETYPE_MODE</th>\n",
       "      <th>TOTALAREA_MODE</th>\n",
       "      <th>WALLSMATERIAL_MODE</th>\n",
       "      <th>EMERGENCYSTATE_MODE</th>\n",
       "      <th>OBS_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_30_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>OBS_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DEF_60_CNT_SOCIAL_CIRCLE</th>\n",
       "      <th>DAYS_LAST_PHONE_CHANGE</th>\n",
       "      <th>FLAG_DOCUMENT_2</th>\n",
       "      <th>FLAG_DOCUMENT_3</th>\n",
       "      <th>FLAG_DOCUMENT_4</th>\n",
       "      <th>FLAG_DOCUMENT_5</th>\n",
       "      <th>FLAG_DOCUMENT_6</th>\n",
       "      <th>FLAG_DOCUMENT_7</th>\n",
       "      <th>FLAG_DOCUMENT_8</th>\n",
       "      <th>FLAG_DOCUMENT_9</th>\n",
       "      <th>FLAG_DOCUMENT_10</th>\n",
       "      <th>FLAG_DOCUMENT_11</th>\n",
       "      <th>FLAG_DOCUMENT_12</th>\n",
       "      <th>FLAG_DOCUMENT_13</th>\n",
       "      <th>FLAG_DOCUMENT_14</th>\n",
       "      <th>FLAG_DOCUMENT_15</th>\n",
       "      <th>FLAG_DOCUMENT_16</th>\n",
       "      <th>FLAG_DOCUMENT_17</th>\n",
       "      <th>FLAG_DOCUMENT_18</th>\n",
       "      <th>FLAG_DOCUMENT_19</th>\n",
       "      <th>FLAG_DOCUMENT_20</th>\n",
       "      <th>FLAG_DOCUMENT_21</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_HOUR</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_DAY</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_WEEK</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_MON</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_QRT</th>\n",
       "      <th>AMT_REQ_CREDIT_BUREAU_YEAR</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100002</td>\n",
       "      <td>1</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>202500.0</td>\n",
       "      <td>406597.5</td>\n",
       "      <td>24700.5</td>\n",
       "      <td>351000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.018801</td>\n",
       "      <td>-9461</td>\n",
       "      <td>-637</td>\n",
       "      <td>-3648.0</td>\n",
       "      <td>-2120</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>0.083037</td>\n",
       "      <td>0.262949</td>\n",
       "      <td>0.139376</td>\n",
       "      <td>0.0247</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6192</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.0202</td>\n",
       "      <td>0.0190</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0252</td>\n",
       "      <td>0.0383</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6341</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0377</td>\n",
       "      <td>0.022</td>\n",
       "      <td>0.0198</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0250</td>\n",
       "      <td>0.0369</td>\n",
       "      <td>0.9722</td>\n",
       "      <td>0.6243</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0690</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>0.1250</td>\n",
       "      <td>0.0375</td>\n",
       "      <td>0.0205</td>\n",
       "      <td>0.0193</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0149</td>\n",
       "      <td>Stone, brick</td>\n",
       "      <td>No</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-1134.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100003</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>N</td>\n",
       "      <td>0</td>\n",
       "      <td>270000.0</td>\n",
       "      <td>1293502.5</td>\n",
       "      <td>35698.5</td>\n",
       "      <td>1129500.0</td>\n",
       "      <td>Family</td>\n",
       "      <td>State servant</td>\n",
       "      <td>Higher education</td>\n",
       "      <td>Married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.003541</td>\n",
       "      <td>-16765</td>\n",
       "      <td>-1188</td>\n",
       "      <td>-1186.0</td>\n",
       "      <td>-291</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>School</td>\n",
       "      <td>0.311267</td>\n",
       "      <td>0.622246</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0959</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7960</td>\n",
       "      <td>0.0605</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0130</td>\n",
       "      <td>0.0773</td>\n",
       "      <td>0.0549</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.0098</td>\n",
       "      <td>0.0924</td>\n",
       "      <td>0.0538</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.8040</td>\n",
       "      <td>0.0497</td>\n",
       "      <td>0.0806</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0128</td>\n",
       "      <td>0.079</td>\n",
       "      <td>0.0554</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0968</td>\n",
       "      <td>0.0529</td>\n",
       "      <td>0.9851</td>\n",
       "      <td>0.7987</td>\n",
       "      <td>0.0608</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.0345</td>\n",
       "      <td>0.2917</td>\n",
       "      <td>0.3333</td>\n",
       "      <td>0.0132</td>\n",
       "      <td>0.0787</td>\n",
       "      <td>0.0558</td>\n",
       "      <td>0.0039</td>\n",
       "      <td>0.01</td>\n",
       "      <td>reg oper account</td>\n",
       "      <td>block of flats</td>\n",
       "      <td>0.0714</td>\n",
       "      <td>Block</td>\n",
       "      <td>No</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-828.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100004</td>\n",
       "      <td>0</td>\n",
       "      <td>Revolving loans</td>\n",
       "      <td>M</td>\n",
       "      <td>Y</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>6750.0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.010032</td>\n",
       "      <td>-19046</td>\n",
       "      <td>-225</td>\n",
       "      <td>-4260.0</td>\n",
       "      <td>-2531</td>\n",
       "      <td>26.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>MONDAY</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Government</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.555912</td>\n",
       "      <td>0.729567</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-815.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100006</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>F</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.0</td>\n",
       "      <td>312682.5</td>\n",
       "      <td>29686.5</td>\n",
       "      <td>297000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Civil marriage</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.008019</td>\n",
       "      <td>-19005</td>\n",
       "      <td>-3039</td>\n",
       "      <td>-9833.0</td>\n",
       "      <td>-2437</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Laborers</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>WEDNESDAY</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Business Entity Type 3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.650442</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-617.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100007</td>\n",
       "      <td>0</td>\n",
       "      <td>Cash loans</td>\n",
       "      <td>M</td>\n",
       "      <td>N</td>\n",
       "      <td>Y</td>\n",
       "      <td>0</td>\n",
       "      <td>121500.0</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>21865.5</td>\n",
       "      <td>513000.0</td>\n",
       "      <td>Unaccompanied</td>\n",
       "      <td>Working</td>\n",
       "      <td>Secondary / secondary special</td>\n",
       "      <td>Single / not married</td>\n",
       "      <td>House / apartment</td>\n",
       "      <td>0.028663</td>\n",
       "      <td>-19932</td>\n",
       "      <td>-3038</td>\n",
       "      <td>-4311.0</td>\n",
       "      <td>-3458</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>Core staff</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>THURSDAY</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Religion</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.322738</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-1106.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  TARGET NAME_CONTRACT_TYPE CODE_GENDER FLAG_OWN_CAR  \\\n",
       "0      100002       1         Cash loans           M            N   \n",
       "1      100003       0         Cash loans           F            N   \n",
       "2      100004       0    Revolving loans           M            Y   \n",
       "3      100006       0         Cash loans           F            N   \n",
       "4      100007       0         Cash loans           M            N   \n",
       "\n",
       "  FLAG_OWN_REALTY  CNT_CHILDREN  AMT_INCOME_TOTAL  AMT_CREDIT  AMT_ANNUITY  \\\n",
       "0               Y             0          202500.0    406597.5      24700.5   \n",
       "1               N             0          270000.0   1293502.5      35698.5   \n",
       "2               Y             0           67500.0    135000.0       6750.0   \n",
       "3               Y             0          135000.0    312682.5      29686.5   \n",
       "4               Y             0          121500.0    513000.0      21865.5   \n",
       "\n",
       "   AMT_GOODS_PRICE NAME_TYPE_SUITE NAME_INCOME_TYPE  \\\n",
       "0         351000.0   Unaccompanied          Working   \n",
       "1        1129500.0          Family    State servant   \n",
       "2         135000.0   Unaccompanied          Working   \n",
       "3         297000.0   Unaccompanied          Working   \n",
       "4         513000.0   Unaccompanied          Working   \n",
       "\n",
       "             NAME_EDUCATION_TYPE    NAME_FAMILY_STATUS  NAME_HOUSING_TYPE  \\\n",
       "0  Secondary / secondary special  Single / not married  House / apartment   \n",
       "1               Higher education               Married  House / apartment   \n",
       "2  Secondary / secondary special  Single / not married  House / apartment   \n",
       "3  Secondary / secondary special        Civil marriage  House / apartment   \n",
       "4  Secondary / secondary special  Single / not married  House / apartment   \n",
       "\n",
       "   REGION_POPULATION_RELATIVE  DAYS_BIRTH  DAYS_EMPLOYED  DAYS_REGISTRATION  \\\n",
       "0                    0.018801       -9461           -637            -3648.0   \n",
       "1                    0.003541      -16765          -1188            -1186.0   \n",
       "2                    0.010032      -19046           -225            -4260.0   \n",
       "3                    0.008019      -19005          -3039            -9833.0   \n",
       "4                    0.028663      -19932          -3038            -4311.0   \n",
       "\n",
       "   DAYS_ID_PUBLISH  OWN_CAR_AGE  FLAG_MOBIL  FLAG_EMP_PHONE  FLAG_WORK_PHONE  \\\n",
       "0            -2120          NaN           1               1                0   \n",
       "1             -291          NaN           1               1                0   \n",
       "2            -2531         26.0           1               1                1   \n",
       "3            -2437          NaN           1               1                0   \n",
       "4            -3458          NaN           1               1                0   \n",
       "\n",
       "   FLAG_CONT_MOBILE  FLAG_PHONE  FLAG_EMAIL OCCUPATION_TYPE  CNT_FAM_MEMBERS  \\\n",
       "0                 1           1           0        Laborers              1.0   \n",
       "1                 1           1           0      Core staff              2.0   \n",
       "2                 1           1           0        Laborers              1.0   \n",
       "3                 1           0           0        Laborers              2.0   \n",
       "4                 1           0           0      Core staff              1.0   \n",
       "\n",
       "   REGION_RATING_CLIENT  REGION_RATING_CLIENT_W_CITY  \\\n",
       "0                     2                            2   \n",
       "1                     1                            1   \n",
       "2                     2                            2   \n",
       "3                     2                            2   \n",
       "4                     2                            2   \n",
       "\n",
       "  WEEKDAY_APPR_PROCESS_START  HOUR_APPR_PROCESS_START  \\\n",
       "0                  WEDNESDAY                       10   \n",
       "1                     MONDAY                       11   \n",
       "2                     MONDAY                        9   \n",
       "3                  WEDNESDAY                       17   \n",
       "4                   THURSDAY                       11   \n",
       "\n",
       "   REG_REGION_NOT_LIVE_REGION  REG_REGION_NOT_WORK_REGION  \\\n",
       "0                           0                           0   \n",
       "1                           0                           0   \n",
       "2                           0                           0   \n",
       "3                           0                           0   \n",
       "4                           0                           0   \n",
       "\n",
       "   LIVE_REGION_NOT_WORK_REGION  REG_CITY_NOT_LIVE_CITY  \\\n",
       "0                            0                       0   \n",
       "1                            0                       0   \n",
       "2                            0                       0   \n",
       "3                            0                       0   \n",
       "4                            0                       0   \n",
       "\n",
       "   REG_CITY_NOT_WORK_CITY  LIVE_CITY_NOT_WORK_CITY       ORGANIZATION_TYPE  \\\n",
       "0                       0                        0  Business Entity Type 3   \n",
       "1                       0                        0                  School   \n",
       "2                       0                        0              Government   \n",
       "3                       0                        0  Business Entity Type 3   \n",
       "4                       1                        1                Religion   \n",
       "\n",
       "   EXT_SOURCE_1  EXT_SOURCE_2  EXT_SOURCE_3  APARTMENTS_AVG  BASEMENTAREA_AVG  \\\n",
       "0      0.083037      0.262949      0.139376          0.0247            0.0369   \n",
       "1      0.311267      0.622246           NaN          0.0959            0.0529   \n",
       "2           NaN      0.555912      0.729567             NaN               NaN   \n",
       "3           NaN      0.650442           NaN             NaN               NaN   \n",
       "4           NaN      0.322738           NaN             NaN               NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_AVG  YEARS_BUILD_AVG  COMMONAREA_AVG  \\\n",
       "0                       0.9722           0.6192          0.0143   \n",
       "1                       0.9851           0.7960          0.0605   \n",
       "2                          NaN              NaN             NaN   \n",
       "3                          NaN              NaN             NaN   \n",
       "4                          NaN              NaN             NaN   \n",
       "\n",
       "   ELEVATORS_AVG  ENTRANCES_AVG  FLOORSMAX_AVG  FLOORSMIN_AVG  LANDAREA_AVG  \\\n",
       "0           0.00         0.0690         0.0833         0.1250        0.0369   \n",
       "1           0.08         0.0345         0.2917         0.3333        0.0130   \n",
       "2            NaN            NaN            NaN            NaN           NaN   \n",
       "3            NaN            NaN            NaN            NaN           NaN   \n",
       "4            NaN            NaN            NaN            NaN           NaN   \n",
       "\n",
       "   LIVINGAPARTMENTS_AVG  LIVINGAREA_AVG  NONLIVINGAPARTMENTS_AVG  \\\n",
       "0                0.0202          0.0190                   0.0000   \n",
       "1                0.0773          0.0549                   0.0039   \n",
       "2                   NaN             NaN                      NaN   \n",
       "3                   NaN             NaN                      NaN   \n",
       "4                   NaN             NaN                      NaN   \n",
       "\n",
       "   NONLIVINGAREA_AVG  APARTMENTS_MODE  BASEMENTAREA_MODE  \\\n",
       "0             0.0000           0.0252             0.0383   \n",
       "1             0.0098           0.0924             0.0538   \n",
       "2                NaN              NaN                NaN   \n",
       "3                NaN              NaN                NaN   \n",
       "4                NaN              NaN                NaN   \n",
       "\n",
       "   YEARS_BEGINEXPLUATATION_MODE  YEARS_BUILD_MODE  COMMONAREA_MODE  \\\n",
       "0                        0.9722            0.6341           0.0144   \n",
       "1                        0.9851            0.8040           0.0497   \n",
       "2                           NaN               NaN              NaN   \n",
       "3                           NaN               NaN              NaN   \n",
       "4                           NaN               NaN              NaN   \n",
       "\n",
       "   ELEVATORS_MODE  ENTRANCES_MODE  FLOORSMAX_MODE  FLOORSMIN_MODE  \\\n",
       "0          0.0000          0.0690          0.0833          0.1250   \n",
       "1          0.0806          0.0345          0.2917          0.3333   \n",
       "2             NaN             NaN             NaN             NaN   \n",
       "3             NaN             NaN             NaN             NaN   \n",
       "4             NaN             NaN             NaN             NaN   \n",
       "\n",
       "   LANDAREA_MODE  LIVINGAPARTMENTS_MODE  LIVINGAREA_MODE  \\\n",
       "0         0.0377                  0.022           0.0198   \n",
       "1         0.0128                  0.079           0.0554   \n",
       "2            NaN                    NaN              NaN   \n",
       "3            NaN                    NaN              NaN   \n",
       "4            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MODE  NONLIVINGAREA_MODE  APARTMENTS_MEDI  \\\n",
       "0                       0.0                 0.0           0.0250   \n",
       "1                       0.0                 0.0           0.0968   \n",
       "2                       NaN                 NaN              NaN   \n",
       "3                       NaN                 NaN              NaN   \n",
       "4                       NaN                 NaN              NaN   \n",
       "\n",
       "   BASEMENTAREA_MEDI  YEARS_BEGINEXPLUATATION_MEDI  YEARS_BUILD_MEDI  \\\n",
       "0             0.0369                        0.9722            0.6243   \n",
       "1             0.0529                        0.9851            0.7987   \n",
       "2                NaN                           NaN               NaN   \n",
       "3                NaN                           NaN               NaN   \n",
       "4                NaN                           NaN               NaN   \n",
       "\n",
       "   COMMONAREA_MEDI  ELEVATORS_MEDI  ENTRANCES_MEDI  FLOORSMAX_MEDI  \\\n",
       "0           0.0144            0.00          0.0690          0.0833   \n",
       "1           0.0608            0.08          0.0345          0.2917   \n",
       "2              NaN             NaN             NaN             NaN   \n",
       "3              NaN             NaN             NaN             NaN   \n",
       "4              NaN             NaN             NaN             NaN   \n",
       "\n",
       "   FLOORSMIN_MEDI  LANDAREA_MEDI  LIVINGAPARTMENTS_MEDI  LIVINGAREA_MEDI  \\\n",
       "0          0.1250         0.0375                 0.0205           0.0193   \n",
       "1          0.3333         0.0132                 0.0787           0.0558   \n",
       "2             NaN            NaN                    NaN              NaN   \n",
       "3             NaN            NaN                    NaN              NaN   \n",
       "4             NaN            NaN                    NaN              NaN   \n",
       "\n",
       "   NONLIVINGAPARTMENTS_MEDI  NONLIVINGAREA_MEDI FONDKAPREMONT_MODE  \\\n",
       "0                    0.0000                0.00   reg oper account   \n",
       "1                    0.0039                0.01   reg oper account   \n",
       "2                       NaN                 NaN                NaN   \n",
       "3                       NaN                 NaN                NaN   \n",
       "4                       NaN                 NaN                NaN   \n",
       "\n",
       "   HOUSETYPE_MODE  TOTALAREA_MODE WALLSMATERIAL_MODE EMERGENCYSTATE_MODE  \\\n",
       "0  block of flats          0.0149       Stone, brick                  No   \n",
       "1  block of flats          0.0714              Block                  No   \n",
       "2             NaN             NaN                NaN                 NaN   \n",
       "3             NaN             NaN                NaN                 NaN   \n",
       "4             NaN             NaN                NaN                 NaN   \n",
       "\n",
       "   OBS_30_CNT_SOCIAL_CIRCLE  DEF_30_CNT_SOCIAL_CIRCLE  \\\n",
       "0                       2.0                       2.0   \n",
       "1                       1.0                       0.0   \n",
       "2                       0.0                       0.0   \n",
       "3                       2.0                       0.0   \n",
       "4                       0.0                       0.0   \n",
       "\n",
       "   OBS_60_CNT_SOCIAL_CIRCLE  DEF_60_CNT_SOCIAL_CIRCLE  DAYS_LAST_PHONE_CHANGE  \\\n",
       "0                       2.0                       2.0                 -1134.0   \n",
       "1                       1.0                       0.0                  -828.0   \n",
       "2                       0.0                       0.0                  -815.0   \n",
       "3                       2.0                       0.0                  -617.0   \n",
       "4                       0.0                       0.0                 -1106.0   \n",
       "\n",
       "   FLAG_DOCUMENT_2  FLAG_DOCUMENT_3  FLAG_DOCUMENT_4  FLAG_DOCUMENT_5  \\\n",
       "0                0                1                0                0   \n",
       "1                0                1                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                1                0                0   \n",
       "4                0                0                0                0   \n",
       "\n",
       "   FLAG_DOCUMENT_6  FLAG_DOCUMENT_7  FLAG_DOCUMENT_8  FLAG_DOCUMENT_9  \\\n",
       "0                0                0                0                0   \n",
       "1                0                0                0                0   \n",
       "2                0                0                0                0   \n",
       "3                0                0                0                0   \n",
       "4                0                0                1                0   \n",
       "\n",
       "   FLAG_DOCUMENT_10  FLAG_DOCUMENT_11  FLAG_DOCUMENT_12  FLAG_DOCUMENT_13  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_14  FLAG_DOCUMENT_15  FLAG_DOCUMENT_16  FLAG_DOCUMENT_17  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   FLAG_DOCUMENT_18  FLAG_DOCUMENT_19  FLAG_DOCUMENT_20  FLAG_DOCUMENT_21  \\\n",
       "0                 0                 0                 0                 0   \n",
       "1                 0                 0                 0                 0   \n",
       "2                 0                 0                 0                 0   \n",
       "3                 0                 0                 0                 0   \n",
       "4                 0                 0                 0                 0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_HOUR  AMT_REQ_CREDIT_BUREAU_DAY  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_WEEK  AMT_REQ_CREDIT_BUREAU_MON  \\\n",
       "0                         0.0                        0.0   \n",
       "1                         0.0                        0.0   \n",
       "2                         0.0                        0.0   \n",
       "3                         NaN                        NaN   \n",
       "4                         0.0                        0.0   \n",
       "\n",
       "   AMT_REQ_CREDIT_BUREAU_QRT  AMT_REQ_CREDIT_BUREAU_YEAR  \n",
       "0                        0.0                         1.0  \n",
       "1                        0.0                         0.0  \n",
       "2                        0.0                         0.0  \n",
       "3                        NaN                         NaN  \n",
       "4                        0.0                         0.0  "
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "application_train_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "      <th>BUREAU_NUMBER_OF_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_CLOSED_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_ACTIVE_LOANS</th>\n",
       "      <th>BUREAU_NUMBER_OF_SOLD_LOANS</th>\n",
       "      <th>DAYS_CREDIT_DIFF</th>\n",
       "      <th>DAYS_CREDIT_DIFF_MEAN</th>\n",
       "      <th>DAYS_CREDIT_POSITIVE</th>\n",
       "      <th>TOTAL_OF_LOAN_DAYS</th>\n",
       "      <th>MEAN_OF_LOAN_DAYS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>83.714286</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>4606.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>160</td>\n",
       "      <td>83.714286</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>4606.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>83.714286</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>4606.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5</td>\n",
       "      <td>83.714286</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>4606.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>65</td>\n",
       "      <td>83.714286</td>\n",
       "      <td>497</td>\n",
       "      <td>344.0</td>\n",
       "      <td>4606.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "0      215354       5714462        Closed      currency 1         -497   \n",
       "1      215354       5714462        Closed      currency 1         -497   \n",
       "2      215354       5714462        Closed      currency 1         -497   \n",
       "3      215354       5714462        Closed      currency 1         -497   \n",
       "4      215354       5714462        Closed      currency 1         -497   \n",
       "\n",
       "   CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "0                   0               -153.0             -153.0   \n",
       "1                   0               -153.0             -153.0   \n",
       "2                   0               -153.0             -153.0   \n",
       "3                   0               -153.0             -153.0   \n",
       "4                   0               -153.0             -153.0   \n",
       "\n",
       "   AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "0                     NaN                   0         91323.0   \n",
       "1                     NaN                   0         91323.0   \n",
       "2                     NaN                   0         91323.0   \n",
       "3                     NaN                   0         91323.0   \n",
       "4                     NaN                   0         91323.0   \n",
       "\n",
       "   AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "0                  0.0                   NaN                     0.0   \n",
       "1                  0.0                   NaN                     0.0   \n",
       "2                  0.0                   NaN                     0.0   \n",
       "3                  0.0                   NaN                     0.0   \n",
       "4                  0.0                   NaN                     0.0   \n",
       "\n",
       "       CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  BUREAU_NUMBER_OF_LOANS  \\\n",
       "0  Consumer credit                -131          NaN                       7   \n",
       "1  Consumer credit                -131          NaN                       7   \n",
       "2  Consumer credit                -131          NaN                       7   \n",
       "3  Consumer credit                -131          NaN                       7   \n",
       "4  Consumer credit                -131          NaN                       7   \n",
       "\n",
       "   BUREAU_NUMBER_OF_CLOSED_LOANS  BUREAU_NUMBER_OF_ACTIVE_LOANS  \\\n",
       "0                            1.0                            6.0   \n",
       "1                            1.0                            6.0   \n",
       "2                            1.0                            6.0   \n",
       "3                            1.0                            6.0   \n",
       "4                            1.0                            6.0   \n",
       "\n",
       "   BUREAU_NUMBER_OF_SOLD_LOANS  DAYS_CREDIT_DIFF  DAYS_CREDIT_DIFF_MEAN  \\\n",
       "0                          0.0                 0              83.714286   \n",
       "1                          0.0               160              83.714286   \n",
       "2                          0.0                 0              83.714286   \n",
       "3                          0.0                 5              83.714286   \n",
       "4                          0.0                65              83.714286   \n",
       "\n",
       "   DAYS_CREDIT_POSITIVE  TOTAL_OF_LOAN_DAYS  MEAN_OF_LOAN_DAYS  \n",
       "0                   497               344.0             4606.0  \n",
       "1                   497               344.0             4606.0  \n",
       "2                   497               344.0             4606.0  \n",
       "3                   497               344.0             4606.0  \n",
       "4                   497               344.0             4606.0  "
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "features = ['SK_ID_CURR', 'BUREAU_NUMBER_OF_LOANS', 'BUREAU_NUMBER_OF_CLOSED_LOANS', 'BUREAU_NUMBER_OF_ACTIVE_LOANS', 'BUREAU_NUMBER_OF_SOLD_LOANS', 'BUREAU_NUMBER_OF_BAD DEBT_LOANS', 'DAYS_CREDIT_DIFF', 'DAYS_CREDIT_DIFF_MEAN', 'MEAN_OF_LOAN_DAYS']\n",
    "bureau_full_df[features].to_csv('dataset/bureau_processed.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>BUREAU_LOAN_COUNT</th>\n",
       "      <th>BUREAU_LOAN_TYPES</th>\n",
       "      <th>AVERAGE_LOAN_TYPE</th>\n",
       "      <th>ACTIVE_LOANS_PERCENTAGE</th>\n",
       "      <th>MIN_DAYS_DIFF</th>\n",
       "      <th>MAX_DAYS_DIFF</th>\n",
       "      <th>MEAN_DAYS_DIFF</th>\n",
       "      <th>STD_DAYS_DIFF</th>\n",
       "      <th>CREDIT_ENDDATE_PERCENTAGE</th>\n",
       "      <th>MIN_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MAX_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MEAN_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>STD_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>AVG_ENDDATE_FUTURE</th>\n",
       "      <th>TOTAL_CUSTOMER_DEBT</th>\n",
       "      <th>TOTAL_CUSTOMER_CREDIT</th>\n",
       "      <th>DEBT_CREDIT_RATIO</th>\n",
       "      <th>TOTAL_CUSTOMER_OVERDUE</th>\n",
       "      <th>OVERDUE_DEBT_RATIO</th>\n",
       "      <th>AVG_CREDITDAYS_PROLONGED</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100001</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0</td>\n",
       "      <td>663</td>\n",
       "      <td>217.571429</td>\n",
       "      <td>234.150135</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0.0</td>\n",
       "      <td>876.0</td>\n",
       "      <td>455.666667</td>\n",
       "      <td>439.067573</td>\n",
       "      <td>455.666667</td>\n",
       "      <td>596686.5</td>\n",
       "      <td>1453365.000</td>\n",
       "      <td>0.410555</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100002</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.750000</td>\n",
       "      <td>171.672238</td>\n",
       "      <td>0.625000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>695.0</td>\n",
       "      <td>143.600000</td>\n",
       "      <td>308.402821</td>\n",
       "      <td>143.600000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>865055.565</td>\n",
       "      <td>0.284122</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100003</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>950</td>\n",
       "      <td>495.000000</td>\n",
       "      <td>480.375548</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1017400.500</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100004</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>918</td>\n",
       "      <td>459.000000</td>\n",
       "      <td>649.124025</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>189037.800</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100005</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1.5</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0</td>\n",
       "      <td>236</td>\n",
       "      <td>103.666667</td>\n",
       "      <td>120.583305</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>601.000000</td>\n",
       "      <td>849.942351</td>\n",
       "      <td>601.000000</td>\n",
       "      <td>568408.5</td>\n",
       "      <td>657126.000</td>\n",
       "      <td>0.864992</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  BUREAU_LOAN_COUNT  BUREAU_LOAN_TYPES  AVERAGE_LOAN_TYPE  \\\n",
       "0      100001                  7                  1                7.0   \n",
       "1      100002                  8                  2                4.0   \n",
       "2      100003                  4                  2                2.0   \n",
       "3      100004                  2                  1                2.0   \n",
       "4      100005                  3                  2                1.5   \n",
       "\n",
       "   ACTIVE_LOANS_PERCENTAGE  MIN_DAYS_DIFF  MAX_DAYS_DIFF  MEAN_DAYS_DIFF  \\\n",
       "0                 0.428571              0            663      217.571429   \n",
       "1                 0.250000              0            397      166.750000   \n",
       "2                 0.250000              0            950      495.000000   \n",
       "3                 0.000000              0            918      459.000000   \n",
       "4                 0.666667              0            236      103.666667   \n",
       "\n",
       "   STD_DAYS_DIFF  CREDIT_ENDDATE_PERCENTAGE  MIN_DAYS_ENDDATE_DIFF  \\\n",
       "0     234.150135                   0.428571                    0.0   \n",
       "1     171.672238                   0.625000                    0.0   \n",
       "2     480.375548                   0.250000                    0.0   \n",
       "3     649.124025                   0.000000                    NaN   \n",
       "4     120.583305                   0.666667                    0.0   \n",
       "\n",
       "   MAX_DAYS_ENDDATE_DIFF  MEAN_DAYS_ENDDATE_DIFF  STD_DAYS_ENDDATE_DIFF  \\\n",
       "0                  876.0              455.666667             439.067573   \n",
       "1                  695.0              143.600000             308.402821   \n",
       "2                    0.0                0.000000                    NaN   \n",
       "3                    NaN                     NaN                    NaN   \n",
       "4                 1202.0              601.000000             849.942351   \n",
       "\n",
       "   AVG_ENDDATE_FUTURE  TOTAL_CUSTOMER_DEBT  TOTAL_CUSTOMER_CREDIT  \\\n",
       "0          455.666667             596686.5            1453365.000   \n",
       "1          143.600000             245781.0             865055.565   \n",
       "2            0.000000                  0.0            1017400.500   \n",
       "3                 NaN                  0.0             189037.800   \n",
       "4          601.000000             568408.5             657126.000   \n",
       "\n",
       "   DEBT_CREDIT_RATIO  TOTAL_CUSTOMER_OVERDUE  OVERDUE_DEBT_RATIO  \\\n",
       "0           0.410555                     0.0                 0.0   \n",
       "1           0.284122                     0.0                 0.0   \n",
       "2           0.000000                     0.0                 NaN   \n",
       "3           0.000000                     0.0                 NaN   \n",
       "4           0.864992                     0.0                 0.0   \n",
       "\n",
       "   AVG_CREDITDAYS_PROLONGED  \n",
       "0                       0.0  \n",
       "1                       0.0  \n",
       "2                       0.0  \n",
       "3                       0.0  \n",
       "4                       0.0  "
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 6124167\n",
    "bureau_df = pd.read_csv('dataset/bureau_processed.csv')\n",
    "bureau_df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Analisando bureau_balance.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import MinMaxScaler\n",
    "\n",
    "bureau_balance_df = pd.read_csv('dataset/bureau_balance.csv')\n",
    "bureau_balance_df['MONTHS_BALANCE'] = bureau_balance_df['MONTHS_BALANCE'] * -1\n",
    "bureau_balance_df['STATUS_NUMBER'] = pd.to_numeric(bureau_balance_df['STATUS'].map({'C': 0,   # Pagamento feito normal\n",
    "                                                                                    'X': 0.1, # Nao tem a informacao, vamos dar um risco baixo\n",
    "                                                                                    '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5}))\n",
    "max_months = bureau_balance_df['MONTHS_BALANCE'].max()\n",
    "bureau_balance_df['RISK_SCORE'] = ((max_months - bureau_balance_df['MONTHS_BALANCE']) * bureau_balance_df['STATUS_NUMBER'])\n",
    "bureau_balance_df['RISK_SCORE'] = bureau_balance_df['RISK_SCORE'] / bureau_balance_df['RISK_SCORE'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df['RISK_SCORE'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5715448</td>\n",
       "      <td>0</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5715448</td>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5715448</td>\n",
       "      <td>2</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5715448</td>\n",
       "      <td>3</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5715448</td>\n",
       "      <td>4</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5715448</td>\n",
       "      <td>5</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5715448</td>\n",
       "      <td>6</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>5715448</td>\n",
       "      <td>7</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>5715448</td>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>5715448</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER  RISK_SCORE\n",
       "0       5715448               0      C            0.0         0.0\n",
       "1       5715448               1      C            0.0         0.0\n",
       "2       5715448               2      C            0.0         0.0\n",
       "3       5715448               3      C            0.0         0.0\n",
       "4       5715448               4      C            0.0         0.0\n",
       "5       5715448               5      C            0.0         0.0\n",
       "6       5715448               6      C            0.0         0.0\n",
       "7       5715448               7      C            0.0         0.0\n",
       "8       5715448               8      C            0.0         0.0\n",
       "9       5715448               9      0            0.0         0.0"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.158958333333\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5715448</td>\n",
       "      <td>0</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5715448</td>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5715448</td>\n",
       "      <td>2</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5715448</td>\n",
       "      <td>3</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5715448</td>\n",
       "      <td>4</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5715448</td>\n",
       "      <td>5</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5715448</td>\n",
       "      <td>6</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>5715448</td>\n",
       "      <td>7</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>5715448</td>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>5715448</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>5715448</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>5715448</td>\n",
       "      <td>11</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.017708</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>5715448</td>\n",
       "      <td>12</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.017500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>5715448</td>\n",
       "      <td>13</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.017292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>5715448</td>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>5715448</td>\n",
       "      <td>15</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>5715448</td>\n",
       "      <td>16</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>5715448</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>5715448</td>\n",
       "      <td>18</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>5715448</td>\n",
       "      <td>19</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>5715448</td>\n",
       "      <td>20</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.015833</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>5715448</td>\n",
       "      <td>21</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.015625</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>5715448</td>\n",
       "      <td>22</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.015417</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>5715448</td>\n",
       "      <td>23</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.015208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>5715448</td>\n",
       "      <td>24</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.015000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>5715448</td>\n",
       "      <td>25</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.014792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>5715448</td>\n",
       "      <td>26</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.014583</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER  RISK_SCORE\n",
       "0        5715448               0      C            0.0    0.000000\n",
       "1        5715448               1      C            0.0    0.000000\n",
       "2        5715448               2      C            0.0    0.000000\n",
       "3        5715448               3      C            0.0    0.000000\n",
       "4        5715448               4      C            0.0    0.000000\n",
       "5        5715448               5      C            0.0    0.000000\n",
       "6        5715448               6      C            0.0    0.000000\n",
       "7        5715448               7      C            0.0    0.000000\n",
       "8        5715448               8      C            0.0    0.000000\n",
       "9        5715448               9      0            0.0    0.000000\n",
       "10       5715448              10      0            0.0    0.000000\n",
       "11       5715448              11      X            0.1    0.017708\n",
       "12       5715448              12      X            0.1    0.017500\n",
       "13       5715448              13      X            0.1    0.017292\n",
       "14       5715448              14      0            0.0    0.000000\n",
       "15       5715448              15      0            0.0    0.000000\n",
       "16       5715448              16      0            0.0    0.000000\n",
       "17       5715448              17      0            0.0    0.000000\n",
       "18       5715448              18      0            0.0    0.000000\n",
       "19       5715448              19      0            0.0    0.000000\n",
       "20       5715448              20      X            0.1    0.015833\n",
       "21       5715448              21      X            0.1    0.015625\n",
       "22       5715448              22      X            0.1    0.015417\n",
       "23       5715448              23      X            0.1    0.015208\n",
       "24       5715448              24      X            0.1    0.015000\n",
       "25       5715448              25      X            0.1    0.014792\n",
       "26       5715448              26      X            0.1    0.014583"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Alguns casos com informações faltantes mas nada demais\n",
    "print(bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 5715448]['RISK_SCORE'].sum())\n",
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 5715448]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5.84375\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>73909</th>\n",
       "      <td>5724857</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73910</th>\n",
       "      <td>5724857</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.989583</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73911</th>\n",
       "      <td>5724857</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.979167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73912</th>\n",
       "      <td>5724857</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.968750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73913</th>\n",
       "      <td>5724857</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.958333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73914</th>\n",
       "      <td>5724857</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.947917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73915</th>\n",
       "      <td>5724857</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73916</th>\n",
       "      <td>5724857</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73917</th>\n",
       "      <td>5724857</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73918</th>\n",
       "      <td>5724857</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73919</th>\n",
       "      <td>5724857</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER  RISK_SCORE\n",
       "73909       5724857               0      5            5.0    1.000000\n",
       "73910       5724857               1      5            5.0    0.989583\n",
       "73911       5724857               2      5            5.0    0.979167\n",
       "73912       5724857               3      5            5.0    0.968750\n",
       "73913       5724857               4      5            5.0    0.958333\n",
       "73914       5724857               5      5            5.0    0.947917\n",
       "73915       5724857               6      0            0.0    0.000000\n",
       "73916       5724857               7      0            0.0    0.000000\n",
       "73917       5724857               8      0            0.0    0.000000\n",
       "73918       5724857               9      0            0.0    0.000000\n",
       "73919       5724857              10      0            0.0    0.000000"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Risco altíssimo, os ultimos meses todos com status 5\n",
    "print(bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 5724857]['RISK_SCORE'].sum())\n",
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 5724857]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### TARGET está igual a 1 mas o RISK_SCORE do bureau é 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.0\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>18350256</th>\n",
       "      <td>6124167</td>\n",
       "      <td>0</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350257</th>\n",
       "      <td>6124167</td>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350258</th>\n",
       "      <td>6124167</td>\n",
       "      <td>2</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350259</th>\n",
       "      <td>6124167</td>\n",
       "      <td>3</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350260</th>\n",
       "      <td>6124167</td>\n",
       "      <td>4</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350261</th>\n",
       "      <td>6124167</td>\n",
       "      <td>5</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350262</th>\n",
       "      <td>6124167</td>\n",
       "      <td>6</td>\n",
       "      <td>C</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350263</th>\n",
       "      <td>6124167</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350264</th>\n",
       "      <td>6124167</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350265</th>\n",
       "      <td>6124167</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350266</th>\n",
       "      <td>6124167</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350267</th>\n",
       "      <td>6124167</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350268</th>\n",
       "      <td>6124167</td>\n",
       "      <td>12</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350269</th>\n",
       "      <td>6124167</td>\n",
       "      <td>13</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350270</th>\n",
       "      <td>6124167</td>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350271</th>\n",
       "      <td>6124167</td>\n",
       "      <td>15</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350272</th>\n",
       "      <td>6124167</td>\n",
       "      <td>16</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350273</th>\n",
       "      <td>6124167</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18350274</th>\n",
       "      <td>6124167</td>\n",
       "      <td>18</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER  RISK_SCORE\n",
       "18350256       6124167               0      C            0.0         0.0\n",
       "18350257       6124167               1      C            0.0         0.0\n",
       "18350258       6124167               2      C            0.0         0.0\n",
       "18350259       6124167               3      C            0.0         0.0\n",
       "18350260       6124167               4      C            0.0         0.0\n",
       "18350261       6124167               5      C            0.0         0.0\n",
       "18350262       6124167               6      C            0.0         0.0\n",
       "18350263       6124167               7      0            0.0         0.0\n",
       "18350264       6124167               8      0            0.0         0.0\n",
       "18350265       6124167               9      0            0.0         0.0\n",
       "18350266       6124167              10      0            0.0         0.0\n",
       "18350267       6124167              11      0            0.0         0.0\n",
       "18350268       6124167              12      0            0.0         0.0\n",
       "18350269       6124167              13      0            0.0         0.0\n",
       "18350270       6124167              14      0            0.0         0.0\n",
       "18350271       6124167              15      0            0.0         0.0\n",
       "18350272       6124167              16      0            0.0         0.0\n",
       "18350273       6124167              17      0            0.0         0.0\n",
       "18350274       6124167              18      0            0.0         0.0"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print(bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6124167]['RISK_SCORE'].sum())\n",
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6124167]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.0105229160579\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>887378</th>\n",
       "      <td>6570709</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.041667e-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887379</th>\n",
       "      <td>6570709</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.051513e-04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887380</th>\n",
       "      <td>6570709</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.083676e-06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887381</th>\n",
       "      <td>6570709</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.140583e-08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887382</th>\n",
       "      <td>6570709</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887383</th>\n",
       "      <td>6570709</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887384</th>\n",
       "      <td>6570709</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887385</th>\n",
       "      <td>6570709</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887386</th>\n",
       "      <td>6570709</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887387</th>\n",
       "      <td>6570709</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887388</th>\n",
       "      <td>6570709</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887389</th>\n",
       "      <td>6570709</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887390</th>\n",
       "      <td>6570709</td>\n",
       "      <td>12</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887391</th>\n",
       "      <td>6570709</td>\n",
       "      <td>13</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887392</th>\n",
       "      <td>6570709</td>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887393</th>\n",
       "      <td>6570709</td>\n",
       "      <td>15</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887394</th>\n",
       "      <td>6570709</td>\n",
       "      <td>16</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887395</th>\n",
       "      <td>6570709</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887396</th>\n",
       "      <td>6570709</td>\n",
       "      <td>18</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887397</th>\n",
       "      <td>6570709</td>\n",
       "      <td>19</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887398</th>\n",
       "      <td>6570709</td>\n",
       "      <td>20</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887399</th>\n",
       "      <td>6570709</td>\n",
       "      <td>21</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887400</th>\n",
       "      <td>6570709</td>\n",
       "      <td>22</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887401</th>\n",
       "      <td>6570709</td>\n",
       "      <td>23</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887402</th>\n",
       "      <td>6570709</td>\n",
       "      <td>24</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887403</th>\n",
       "      <td>6570709</td>\n",
       "      <td>25</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887404</th>\n",
       "      <td>6570709</td>\n",
       "      <td>26</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.226433e-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>887405</th>\n",
       "      <td>6570709</td>\n",
       "      <td>27</td>\n",
       "      <td>X</td>\n",
       "      <td>0.1</td>\n",
       "      <td>1.872961e-10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER    RISK_SCORE\n",
       "887378       6570709               0      4            4.0  1.041667e-02\n",
       "887379       6570709               1      3            3.0  1.051513e-04\n",
       "887380       6570709               2      2            2.0  1.083676e-06\n",
       "887381       6570709               3      1            1.0  1.140583e-08\n",
       "887382       6570709               4      0            0.0  1.226433e-10\n",
       "887383       6570709               5      0            0.0  1.226433e-10\n",
       "887384       6570709               6      0            0.0  1.226433e-10\n",
       "887385       6570709               7      0            0.0  1.226433e-10\n",
       "887386       6570709               8      0            0.0  1.226433e-10\n",
       "887387       6570709               9      0            0.0  1.226433e-10\n",
       "887388       6570709              10      0            0.0  1.226433e-10\n",
       "887389       6570709              11      0            0.0  1.226433e-10\n",
       "887390       6570709              12      0            0.0  1.226433e-10\n",
       "887391       6570709              13      0            0.0  1.226433e-10\n",
       "887392       6570709              14      0            0.0  1.226433e-10\n",
       "887393       6570709              15      0            0.0  1.226433e-10\n",
       "887394       6570709              16      0            0.0  1.226433e-10\n",
       "887395       6570709              17      0            0.0  1.226433e-10\n",
       "887396       6570709              18      0            0.0  1.226433e-10\n",
       "887397       6570709              19      0            0.0  1.226433e-10\n",
       "887398       6570709              20      0            0.0  1.226433e-10\n",
       "887399       6570709              21      0            0.0  1.226433e-10\n",
       "887400       6570709              22      0            0.0  1.226433e-10\n",
       "887401       6570709              23      0            0.0  1.226433e-10\n",
       "887402       6570709              24      0            0.0  1.226433e-10\n",
       "887403       6570709              25      0            0.0  1.226433e-10\n",
       "887404       6570709              26      0            0.0  1.226433e-10\n",
       "887405       6570709              27      X            0.1  1.872961e-10"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Ultimos 4 meses mais recentes atrasados\n",
    "print(bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6570709]['RISK_SCORE'].sum())\n",
    "bureau_balance_df[bureau_balance_df.SK_ID_BUREAU == 6570709]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5001709</td>\n",
       "      <td>0.011458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5001710</td>\n",
       "      <td>0.178958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5001711</td>\n",
       "      <td>0.020000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5001712</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5001713</td>\n",
       "      <td>0.391875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5001714</td>\n",
       "      <td>0.278125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5001715</td>\n",
       "      <td>0.831250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>5001716</td>\n",
       "      <td>0.085417</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>5001717</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>5001718</td>\n",
       "      <td>0.517083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>5001719</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>5001720</td>\n",
       "      <td>1.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>5001721</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>5001722</td>\n",
       "      <td>1.610417</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>5001723</td>\n",
       "      <td>0.405625</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>5001724</td>\n",
       "      <td>0.131250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>5001725</td>\n",
       "      <td>0.018542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>5001726</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>5001727</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>5001728</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>5001729</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>5001730</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>5001731</td>\n",
       "      <td>0.208542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>5001732</td>\n",
       "      <td>0.588750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>5001733</td>\n",
       "      <td>0.208542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>5001734</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>5001735</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>5001736</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>5001737</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>5001738</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817365</th>\n",
       "      <td>6842859</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817366</th>\n",
       "      <td>6842860</td>\n",
       "      <td>0.110208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817367</th>\n",
       "      <td>6842861</td>\n",
       "      <td>0.170833</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817368</th>\n",
       "      <td>6842862</td>\n",
       "      <td>0.374375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817369</th>\n",
       "      <td>6842863</td>\n",
       "      <td>0.244792</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817370</th>\n",
       "      <td>6842864</td>\n",
       "      <td>0.313958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817371</th>\n",
       "      <td>6842865</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817372</th>\n",
       "      <td>6842866</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817373</th>\n",
       "      <td>6842867</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817374</th>\n",
       "      <td>6842868</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817375</th>\n",
       "      <td>6842869</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817376</th>\n",
       "      <td>6842870</td>\n",
       "      <td>0.026250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817377</th>\n",
       "      <td>6842871</td>\n",
       "      <td>0.125000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817378</th>\n",
       "      <td>6842872</td>\n",
       "      <td>0.007917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817379</th>\n",
       "      <td>6842873</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817380</th>\n",
       "      <td>6842874</td>\n",
       "      <td>0.022292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817381</th>\n",
       "      <td>6842875</td>\n",
       "      <td>0.004167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817382</th>\n",
       "      <td>6842876</td>\n",
       "      <td>0.437500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817383</th>\n",
       "      <td>6842877</td>\n",
       "      <td>0.011667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817384</th>\n",
       "      <td>6842878</td>\n",
       "      <td>0.029167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817385</th>\n",
       "      <td>6842879</td>\n",
       "      <td>0.188958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817386</th>\n",
       "      <td>6842880</td>\n",
       "      <td>0.332917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817387</th>\n",
       "      <td>6842881</td>\n",
       "      <td>0.220000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817388</th>\n",
       "      <td>6842882</td>\n",
       "      <td>0.076250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817389</th>\n",
       "      <td>6842883</td>\n",
       "      <td>0.012500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817390</th>\n",
       "      <td>6842884</td>\n",
       "      <td>0.263333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817391</th>\n",
       "      <td>6842885</td>\n",
       "      <td>11.312500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817392</th>\n",
       "      <td>6842886</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817393</th>\n",
       "      <td>6842887</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>817394</th>\n",
       "      <td>6842888</td>\n",
       "      <td>0.079167</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>817395 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_BUREAU  RISK_SCORE\n",
       "0            5001709    0.011458\n",
       "1            5001710    0.178958\n",
       "2            5001711    0.020000\n",
       "3            5001712    0.000000\n",
       "4            5001713    0.391875\n",
       "5            5001714    0.278125\n",
       "6            5001715    0.831250\n",
       "7            5001716    0.085417\n",
       "8            5001717    0.000000\n",
       "9            5001718    0.517083\n",
       "10           5001719    0.000000\n",
       "11           5001720    1.300000\n",
       "12           5001721    0.000000\n",
       "13           5001722    1.610417\n",
       "14           5001723    0.405625\n",
       "15           5001724    0.131250\n",
       "16           5001725    0.018542\n",
       "17           5001726    0.000000\n",
       "18           5001727    0.000000\n",
       "19           5001728    0.000000\n",
       "20           5001729    0.000000\n",
       "21           5001730    0.000000\n",
       "22           5001731    0.208542\n",
       "23           5001732    0.588750\n",
       "24           5001733    0.208542\n",
       "25           5001734    0.000000\n",
       "26           5001735    0.000000\n",
       "27           5001736    0.000000\n",
       "28           5001737    0.000000\n",
       "29           5001738    0.000000\n",
       "...              ...         ...\n",
       "817365       6842859    0.000000\n",
       "817366       6842860    0.110208\n",
       "817367       6842861    0.170833\n",
       "817368       6842862    0.374375\n",
       "817369       6842863    0.244792\n",
       "817370       6842864    0.313958\n",
       "817371       6842865    0.000000\n",
       "817372       6842866    0.000000\n",
       "817373       6842867    0.000000\n",
       "817374       6842868    0.000000\n",
       "817375       6842869    0.000000\n",
       "817376       6842870    0.026250\n",
       "817377       6842871    0.125000\n",
       "817378       6842872    0.007917\n",
       "817379       6842873    0.000000\n",
       "817380       6842874    0.022292\n",
       "817381       6842875    0.004167\n",
       "817382       6842876    0.437500\n",
       "817383       6842877    0.011667\n",
       "817384       6842878    0.029167\n",
       "817385       6842879    0.188958\n",
       "817386       6842880    0.332917\n",
       "817387       6842881    0.220000\n",
       "817388       6842882    0.076250\n",
       "817389       6842883    0.012500\n",
       "817390       6842884    0.263333\n",
       "817391       6842885   11.312500\n",
       "817392       6842886    0.000000\n",
       "817393       6842887    0.000000\n",
       "817394       6842888    0.079167\n",
       "\n",
       "[817395 rows x 2 columns]"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df.groupby(by='SK_ID_BUREAU')['RISK_SCORE'].sum().reset_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index.\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "      <th>STATUS_NUMBER</th>\n",
       "      <th>TRUST_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>887378</th>\n",
       "      <td>6570709</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1774273</th>\n",
       "      <td>6596848</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1858554</th>\n",
       "      <td>6007250</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2136851</th>\n",
       "      <td>5213550</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2428365</th>\n",
       "      <td>6544132</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2557142</th>\n",
       "      <td>6261447</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2678167</th>\n",
       "      <td>5852578</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2678180</th>\n",
       "      <td>5852580</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3876792</th>\n",
       "      <td>6368817</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3900938</th>\n",
       "      <td>5784915</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4759426</th>\n",
       "      <td>5051161</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4986632</th>\n",
       "      <td>5190285</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5360996</th>\n",
       "      <td>6830699</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5868063</th>\n",
       "      <td>5735461</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6080331</th>\n",
       "      <td>5137203</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7188630</th>\n",
       "      <td>5180495</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7263631</th>\n",
       "      <td>5036660</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7441827</th>\n",
       "      <td>6451121</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7818777</th>\n",
       "      <td>6098802</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7818788</th>\n",
       "      <td>6098803</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7947326</th>\n",
       "      <td>5735663</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8143328</th>\n",
       "      <td>6397807</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8762389</th>\n",
       "      <td>5976450</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8780970</th>\n",
       "      <td>6529330</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9313187</th>\n",
       "      <td>5969398</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9813303</th>\n",
       "      <td>6782546</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10975903</th>\n",
       "      <td>5105196</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11212610</th>\n",
       "      <td>6099301</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11786644</th>\n",
       "      <td>5439774</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12557964</th>\n",
       "      <td>5976308</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13842377</th>\n",
       "      <td>5678559</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13924899</th>\n",
       "      <td>5440039</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14964193</th>\n",
       "      <td>6032072</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15493886</th>\n",
       "      <td>6077868</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15847408</th>\n",
       "      <td>6520992</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17668092</th>\n",
       "      <td>6123264</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18585346</th>\n",
       "      <td>6207546</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18922150</th>\n",
       "      <td>6744059</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19278616</th>\n",
       "      <td>5269115</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19329042</th>\n",
       "      <td>5355107</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19333278</th>\n",
       "      <td>5353475</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19389735</th>\n",
       "      <td>5279135</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19522846</th>\n",
       "      <td>5267978</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19930232</th>\n",
       "      <td>5290876</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21058087</th>\n",
       "      <td>6425246</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21132830</th>\n",
       "      <td>5513478</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21696556</th>\n",
       "      <td>5125763</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21757813</th>\n",
       "      <td>6213502</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22367231</th>\n",
       "      <td>6608018</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22765659</th>\n",
       "      <td>5760583</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22960853</th>\n",
       "      <td>6840222</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23341614</th>\n",
       "      <td>6664880</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24430478</th>\n",
       "      <td>6336371</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24727773</th>\n",
       "      <td>5735459</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25059959</th>\n",
       "      <td>6686545</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25822222</th>\n",
       "      <td>6691563</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25999976</th>\n",
       "      <td>5632201</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26350268</th>\n",
       "      <td>6690339</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26493076</th>\n",
       "      <td>5982255</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26902742</th>\n",
       "      <td>5995766</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>62 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          SK_ID_BUREAU  MONTHS_BALANCE STATUS  STATUS_NUMBER  TRUST_SCORE\n",
       "887378         6570709               0      4            4.0          1.0\n",
       "1774273        6596848               0      4            4.0          1.0\n",
       "1858554        6007250               0      4            4.0          1.0\n",
       "2136851        5213550               0      4            4.0          1.0\n",
       "2428365        6544132               0      4            4.0          1.0\n",
       "2557142        6261447               0      4            4.0          1.0\n",
       "2678167        5852578               0      4            4.0          1.0\n",
       "2678180        5852580               0      4            4.0          1.0\n",
       "3876792        6368817               0      4            4.0          1.0\n",
       "3900938        5784915               0      4            4.0          1.0\n",
       "4759426        5051161               0      4            4.0          1.0\n",
       "4986632        5190285               0      4            4.0          1.0\n",
       "5360996        6830699               0      4            4.0          1.0\n",
       "5868063        5735461               0      4            4.0          1.0\n",
       "6080331        5137203               0      4            4.0          1.0\n",
       "7188630        5180495               0      4            4.0          1.0\n",
       "7263631        5036660               0      4            4.0          1.0\n",
       "7441827        6451121               0      4            4.0          1.0\n",
       "7818777        6098802               0      4            4.0          1.0\n",
       "7818788        6098803               0      4            4.0          1.0\n",
       "7947326        5735663               0      4            4.0          1.0\n",
       "8143328        6397807               0      4            4.0          1.0\n",
       "8762389        5976450               0      4            4.0          1.0\n",
       "8780970        6529330               0      4            4.0          1.0\n",
       "9313187        5969398               0      4            4.0          1.0\n",
       "9813303        6782546               0      4            4.0          1.0\n",
       "10975903       5105196               0      4            4.0          1.0\n",
       "11212610       6099301               0      4            4.0          1.0\n",
       "11786644       5439774               0      4            4.0          1.0\n",
       "12557964       5976308               0      4            4.0          1.0\n",
       "...                ...             ...    ...            ...          ...\n",
       "13842377       5678559               0      4            4.0          1.0\n",
       "13924899       5440039               0      4            4.0          1.0\n",
       "14964193       6032072               0      4            4.0          1.0\n",
       "15493886       6077868               0      4            4.0          1.0\n",
       "15847408       6520992               0      4            4.0          1.0\n",
       "17668092       6123264               0      4            4.0          1.0\n",
       "18585346       6207546               0      4            4.0          1.0\n",
       "18922150       6744059               0      4            4.0          1.0\n",
       "19278616       5269115               0      4            4.0          1.0\n",
       "19329042       5355107               0      4            4.0          1.0\n",
       "19333278       5353475               0      4            4.0          1.0\n",
       "19389735       5279135               0      4            4.0          1.0\n",
       "19522846       5267978               0      4            4.0          1.0\n",
       "19930232       5290876               0      4            4.0          1.0\n",
       "21058087       6425246               0      4            4.0          1.0\n",
       "21132830       5513478               0      4            4.0          1.0\n",
       "21696556       5125763               0      4            4.0          1.0\n",
       "21757813       6213502               0      4            4.0          1.0\n",
       "22367231       6608018               0      4            4.0          1.0\n",
       "22765659       5760583               0      4            4.0          1.0\n",
       "22960853       6840222               0      4            4.0          1.0\n",
       "23341614       6664880               0      4            4.0          1.0\n",
       "24430478       6336371               0      4            4.0          1.0\n",
       "24727773       5735459               0      4            4.0          1.0\n",
       "25059959       6686545               0      4            4.0          1.0\n",
       "25822222       6691563               0      4            4.0          1.0\n",
       "25999976       5632201               0      4            4.0          1.0\n",
       "26350268       6690339               0      4            4.0          1.0\n",
       "26493076       5982255               0      4            4.0          1.0\n",
       "26902742       5995766               0      4            4.0          1.0\n",
       "\n",
       "[62 rows x 5 columns]"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df[bureau_balance_df.STATUS == '4'][bureau_balance_df.MONTHS_BALANCE == 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['C', '0', 'X', '1', '2', '3', '5', '4'], dtype=object)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df.STATUS.unique()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* C - emprestimo liquidado (closed)\n",
    "* 0 - pagamento dentro do prazo\n",
    "* 1, 2, 3, 4, 5 - pagamento atrasado\n",
    "* X - não tem informação"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "bb_processed_df = pd.read_csv('dataset/bureau_balance_processed.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "        bureau: 1716428\n",
      "bureau_balance: 817395\n"
     ]
    }
   ],
   "source": [
    "bureau_df = pd.read_csv('dataset/bureau.csv')\n",
    "print('        bureau:', len(bureau_df.SK_ID_BUREAU.unique()))\n",
    "\n",
    "bureau_balance_df = pd.read_csv('dataset/bureau_balance.csv')\n",
    "print('bureau_balance:', len(bureau_balance_df.SK_ID_BUREAU.unique()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index(['SK_ID_CURR', 'BUREAU_LOAN_COUNT', 'BUREAU_LOAN_TYPES',\n",
      "       'AVERAGE_LOAN_TYPE', 'ACTIVE_LOANS_PERCENTAGE', 'MIN_DAYS_DIFF',\n",
      "       'MAX_DAYS_DIFF', 'MEAN_DAYS_DIFF', 'STD_DAYS_DIFF',\n",
      "       'CREDIT_ENDDATE_PERCENTAGE', 'MIN_DAYS_ENDDATE_DIFF',\n",
      "       'MAX_DAYS_ENDDATE_DIFF', 'MEAN_DAYS_ENDDATE_DIFF',\n",
      "       'STD_DAYS_ENDDATE_DIFF', 'AVG_ENDDATE_FUTURE', 'TOTAL_CUSTOMER_DEBT',\n",
      "       'TOTAL_CUSTOMER_CREDIT', 'DEBT_CREDIT_RATIO', 'TOTAL_CUSTOMER_OVERDUE',\n",
      "       'OVERDUE_DEBT_RATIO', 'AVG_CREDITDAYS_PROLONGED', 'MIN_RISK_SCORE',\n",
      "       'MAX_RISK_SCORE', 'MEAN_RISK_SCORE', 'STD_RISK_SCORE',\n",
      "       'SUM_RISK_SCORE'],\n",
      "      dtype='object')\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>BUREAU_LOAN_COUNT</th>\n",
       "      <th>BUREAU_LOAN_TYPES</th>\n",
       "      <th>AVERAGE_LOAN_TYPE</th>\n",
       "      <th>ACTIVE_LOANS_PERCENTAGE</th>\n",
       "      <th>MIN_DAYS_DIFF</th>\n",
       "      <th>MAX_DAYS_DIFF</th>\n",
       "      <th>MEAN_DAYS_DIFF</th>\n",
       "      <th>STD_DAYS_DIFF</th>\n",
       "      <th>CREDIT_ENDDATE_PERCENTAGE</th>\n",
       "      <th>MIN_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MAX_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>MEAN_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>STD_DAYS_ENDDATE_DIFF</th>\n",
       "      <th>AVG_ENDDATE_FUTURE</th>\n",
       "      <th>TOTAL_CUSTOMER_DEBT</th>\n",
       "      <th>TOTAL_CUSTOMER_CREDIT</th>\n",
       "      <th>DEBT_CREDIT_RATIO</th>\n",
       "      <th>TOTAL_CUSTOMER_OVERDUE</th>\n",
       "      <th>OVERDUE_DEBT_RATIO</th>\n",
       "      <th>AVG_CREDITDAYS_PROLONGED</th>\n",
       "      <th>MIN_RISK_SCORE</th>\n",
       "      <th>MAX_RISK_SCORE</th>\n",
       "      <th>MEAN_RISK_SCORE</th>\n",
       "      <th>STD_RISK_SCORE</th>\n",
       "      <th>SUM_RISK_SCORE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100001</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0</td>\n",
       "      <td>663</td>\n",
       "      <td>217.571429</td>\n",
       "      <td>234.150135</td>\n",
       "      <td>0.428571</td>\n",
       "      <td>0.0</td>\n",
       "      <td>876.0</td>\n",
       "      <td>455.666667</td>\n",
       "      <td>439.067573</td>\n",
       "      <td>455.666667</td>\n",
       "      <td>596686.5</td>\n",
       "      <td>1453365.000</td>\n",
       "      <td>0.410555</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.306250</td>\n",
       "      <td>0.091101</td>\n",
       "      <td>0.108530</td>\n",
       "      <td>0.637708</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100002</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>397</td>\n",
       "      <td>166.750000</td>\n",
       "      <td>171.672238</td>\n",
       "      <td>0.625000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>695.0</td>\n",
       "      <td>143.600000</td>\n",
       "      <td>308.402821</td>\n",
       "      <td>143.600000</td>\n",
       "      <td>245781.0</td>\n",
       "      <td>865055.565</td>\n",
       "      <td>0.284122</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.934375</td>\n",
       "      <td>0.508646</td>\n",
       "      <td>0.416903</td>\n",
       "      <td>4.069167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100003</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>950</td>\n",
       "      <td>495.000000</td>\n",
       "      <td>480.375548</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1017400.500</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100004</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>918</td>\n",
       "      <td>459.000000</td>\n",
       "      <td>649.124025</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>189037.800</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100005</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1.5</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0</td>\n",
       "      <td>236</td>\n",
       "      <td>103.666667</td>\n",
       "      <td>120.583305</td>\n",
       "      <td>0.666667</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1202.0</td>\n",
       "      <td>601.000000</td>\n",
       "      <td>849.942351</td>\n",
       "      <td>601.000000</td>\n",
       "      <td>568408.5</td>\n",
       "      <td>657126.000</td>\n",
       "      <td>0.864992</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.020000</td>\n",
       "      <td>0.012500</td>\n",
       "      <td>0.010897</td>\n",
       "      <td>0.037500</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  BUREAU_LOAN_COUNT  BUREAU_LOAN_TYPES  AVERAGE_LOAN_TYPE  \\\n",
       "0      100001                  7                  1                7.0   \n",
       "1      100002                  8                  2                4.0   \n",
       "2      100003                  4                  2                2.0   \n",
       "3      100004                  2                  1                2.0   \n",
       "4      100005                  3                  2                1.5   \n",
       "\n",
       "   ACTIVE_LOANS_PERCENTAGE  MIN_DAYS_DIFF  MAX_DAYS_DIFF  MEAN_DAYS_DIFF  \\\n",
       "0                 0.428571              0            663      217.571429   \n",
       "1                 0.250000              0            397      166.750000   \n",
       "2                 0.250000              0            950      495.000000   \n",
       "3                 0.000000              0            918      459.000000   \n",
       "4                 0.666667              0            236      103.666667   \n",
       "\n",
       "   STD_DAYS_DIFF  CREDIT_ENDDATE_PERCENTAGE  MIN_DAYS_ENDDATE_DIFF  \\\n",
       "0     234.150135                   0.428571                    0.0   \n",
       "1     171.672238                   0.625000                    0.0   \n",
       "2     480.375548                   0.250000                    0.0   \n",
       "3     649.124025                   0.000000                    NaN   \n",
       "4     120.583305                   0.666667                    0.0   \n",
       "\n",
       "   MAX_DAYS_ENDDATE_DIFF  MEAN_DAYS_ENDDATE_DIFF  STD_DAYS_ENDDATE_DIFF  \\\n",
       "0                  876.0              455.666667             439.067573   \n",
       "1                  695.0              143.600000             308.402821   \n",
       "2                    0.0                0.000000                    NaN   \n",
       "3                    NaN                     NaN                    NaN   \n",
       "4                 1202.0              601.000000             849.942351   \n",
       "\n",
       "   AVG_ENDDATE_FUTURE  TOTAL_CUSTOMER_DEBT  TOTAL_CUSTOMER_CREDIT  \\\n",
       "0          455.666667             596686.5            1453365.000   \n",
       "1          143.600000             245781.0             865055.565   \n",
       "2            0.000000                  0.0            1017400.500   \n",
       "3                 NaN                  0.0             189037.800   \n",
       "4          601.000000             568408.5             657126.000   \n",
       "\n",
       "   DEBT_CREDIT_RATIO  TOTAL_CUSTOMER_OVERDUE  OVERDUE_DEBT_RATIO  \\\n",
       "0           0.410555                     0.0                 0.0   \n",
       "1           0.284122                     0.0                 0.0   \n",
       "2           0.000000                     0.0                 NaN   \n",
       "3           0.000000                     0.0                 NaN   \n",
       "4           0.864992                     0.0                 0.0   \n",
       "\n",
       "   AVG_CREDITDAYS_PROLONGED  MIN_RISK_SCORE  MAX_RISK_SCORE  MEAN_RISK_SCORE  \\\n",
       "0                       0.0             0.0        0.306250         0.091101   \n",
       "1                       0.0             0.0        0.934375         0.508646   \n",
       "2                       0.0             NaN             NaN              NaN   \n",
       "3                       0.0             NaN             NaN              NaN   \n",
       "4                       0.0             0.0        0.020000         0.012500   \n",
       "\n",
       "   STD_RISK_SCORE  SUM_RISK_SCORE  \n",
       "0        0.108530        0.637708  \n",
       "1        0.416903        4.069167  \n",
       "2             NaN        0.000000  \n",
       "3             NaN        0.000000  \n",
       "4        0.010897        0.037500  "
      ]
     },
     "execution_count": 169,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_processed_df = pd.read_csv('dataset/bureau_processed.csv')\n",
    "#print('bureau_processed:', len(bureau_processed_df.SK_ID_BUREAU.unique()))\n",
    "print(bureau_processed_df.columns)\n",
    "bureau_processed_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1716428"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(bureau_df.SK_ID_BUREAU.unique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>13</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "      <th>30</th>\n",
       "      <th>31</th>\n",
       "      <th>32</th>\n",
       "      <th>33</th>\n",
       "      <th>34</th>\n",
       "      <th>35</th>\n",
       "      <th>36</th>\n",
       "      <th>37</th>\n",
       "      <th>38</th>\n",
       "      <th>39</th>\n",
       "      <th>40</th>\n",
       "      <th>41</th>\n",
       "      <th>42</th>\n",
       "      <th>43</th>\n",
       "      <th>44</th>\n",
       "      <th>45</th>\n",
       "      <th>46</th>\n",
       "      <th>47</th>\n",
       "      <th>48</th>\n",
       "      <th>49</th>\n",
       "      <th>50</th>\n",
       "      <th>51</th>\n",
       "      <th>52</th>\n",
       "      <th>53</th>\n",
       "      <th>54</th>\n",
       "      <th>55</th>\n",
       "      <th>56</th>\n",
       "      <th>57</th>\n",
       "      <th>58</th>\n",
       "      <th>59</th>\n",
       "      <th>60</th>\n",
       "      <th>61</th>\n",
       "      <th>62</th>\n",
       "      <th>63</th>\n",
       "      <th>64</th>\n",
       "      <th>65</th>\n",
       "      <th>66</th>\n",
       "      <th>67</th>\n",
       "      <th>68</th>\n",
       "      <th>69</th>\n",
       "      <th>70</th>\n",
       "      <th>71</th>\n",
       "      <th>72</th>\n",
       "      <th>73</th>\n",
       "      <th>74</th>\n",
       "      <th>75</th>\n",
       "      <th>76</th>\n",
       "      <th>77</th>\n",
       "      <th>78</th>\n",
       "      <th>79</th>\n",
       "      <th>80</th>\n",
       "      <th>81</th>\n",
       "      <th>82</th>\n",
       "      <th>83</th>\n",
       "      <th>84</th>\n",
       "      <th>85</th>\n",
       "      <th>86</th>\n",
       "      <th>87</th>\n",
       "      <th>88</th>\n",
       "      <th>89</th>\n",
       "      <th>90</th>\n",
       "      <th>91</th>\n",
       "      <th>92</th>\n",
       "      <th>93</th>\n",
       "      <th>94</th>\n",
       "      <th>95</th>\n",
       "      <th>96</th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>TRAIN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5001709</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5001710</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5001711</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5001712</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5001713</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>150635.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU    0    1    2    3    4    5    6    7    8    9   10   11  \\\n",
       "0       5001709 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "1       5001710 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "2       5001711 -2.0  0.0  0.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3       5001712 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0  0.0  0.0   \n",
       "4       5001713 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0   \n",
       "\n",
       "    12   13   14   15   16   17   18   19   20   21   22   23   24   25   26  \\\n",
       "0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "1 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3  0.0  0.0  0.0  0.0  0.0  0.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    27   28   29   30   31   32   33   34   35   36   37   38   39   40   41  \\\n",
       "0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "1 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    42   43   44   45   46   47   48   49   50   51   52   53   54   55   56  \\\n",
       "0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "1 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0 -2.0  0.0  0.0  0.0  0.0 -2.0 -2.0 -2.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    57   58   59   60   61   62   63   64   65   66   67   68   69   70   71  \\\n",
       "0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "1 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    72   73   74   75   76   77   78   79   80   81   82   83   84   85   86  \\\n",
       "0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -2.0   \n",
       "1 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -3.0 -3.0 -3.0 -3.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    87   88   89   90   91   92   93   94   95   96  SK_ID_CURR  TARGET  TRAIN  \n",
       "0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0         NaN     NaN    0.0  \n",
       "1 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0     NaN    0.0  \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0     NaN    0.0  \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0     NaN    0.0  \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    150635.0     NaN    0.0  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bb_processed_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>100001.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>100002.0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>100005.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>100010.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>100013.0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_CURR  SK_ID_BUREAU\n",
       "0    100001.0             7\n",
       "1    100002.0             8\n",
       "2    100005.0             3\n",
       "3    100010.0             2\n",
       "4    100013.0             4"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "group = bb_processed_df.groupby(by='SK_ID_CURR')['SK_ID_BUREAU'].count().reset_index()\n",
    "group.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>13</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "      <th>30</th>\n",
       "      <th>31</th>\n",
       "      <th>32</th>\n",
       "      <th>33</th>\n",
       "      <th>34</th>\n",
       "      <th>35</th>\n",
       "      <th>36</th>\n",
       "      <th>37</th>\n",
       "      <th>38</th>\n",
       "      <th>39</th>\n",
       "      <th>40</th>\n",
       "      <th>41</th>\n",
       "      <th>42</th>\n",
       "      <th>43</th>\n",
       "      <th>44</th>\n",
       "      <th>45</th>\n",
       "      <th>46</th>\n",
       "      <th>47</th>\n",
       "      <th>48</th>\n",
       "      <th>49</th>\n",
       "      <th>50</th>\n",
       "      <th>51</th>\n",
       "      <th>52</th>\n",
       "      <th>53</th>\n",
       "      <th>54</th>\n",
       "      <th>55</th>\n",
       "      <th>56</th>\n",
       "      <th>57</th>\n",
       "      <th>58</th>\n",
       "      <th>59</th>\n",
       "      <th>60</th>\n",
       "      <th>61</th>\n",
       "      <th>62</th>\n",
       "      <th>63</th>\n",
       "      <th>64</th>\n",
       "      <th>65</th>\n",
       "      <th>66</th>\n",
       "      <th>67</th>\n",
       "      <th>68</th>\n",
       "      <th>69</th>\n",
       "      <th>70</th>\n",
       "      <th>71</th>\n",
       "      <th>72</th>\n",
       "      <th>73</th>\n",
       "      <th>74</th>\n",
       "      <th>75</th>\n",
       "      <th>76</th>\n",
       "      <th>77</th>\n",
       "      <th>78</th>\n",
       "      <th>79</th>\n",
       "      <th>80</th>\n",
       "      <th>81</th>\n",
       "      <th>82</th>\n",
       "      <th>83</th>\n",
       "      <th>84</th>\n",
       "      <th>85</th>\n",
       "      <th>86</th>\n",
       "      <th>87</th>\n",
       "      <th>88</th>\n",
       "      <th>89</th>\n",
       "      <th>90</th>\n",
       "      <th>91</th>\n",
       "      <th>92</th>\n",
       "      <th>93</th>\n",
       "      <th>94</th>\n",
       "      <th>95</th>\n",
       "      <th>96</th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>TRAIN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>297263</th>\n",
       "      <td>5896630</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297264</th>\n",
       "      <td>5896631</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297265</th>\n",
       "      <td>5896632</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297266</th>\n",
       "      <td>5896633</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297267</th>\n",
       "      <td>5896634</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297268</th>\n",
       "      <td>5896635</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297269</th>\n",
       "      <td>5896636</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>100001.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        SK_ID_BUREAU    0    1    2    3    4    5    6    7    8    9   10  \\\n",
       "297263       5896630 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297264       5896631 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297265       5896632 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297266       5896633 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297267       5896634  1.0  0.0  0.0  0.0  0.0  0.0 -2.0  0.0 -2.0 -2.0  0.0   \n",
       "297268       5896635  0.0 -2.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269       5896636  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "\n",
       "         11   12   13   14   15   16   17   18   19   20   21   22   23   24  \\\n",
       "297263 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0 -2.0 -2.0  0.0  0.0 -2.0   \n",
       "297264 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297265 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -2.0 -2.0 -2.0  0.0 -2.0 -2.0 -2.0   \n",
       "297266 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297267  0.0 -2.0  0.0 -2.0  0.0  0.0 -2.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         25   26   27   28   29   30   31   32   33   34   35   36   37   38  \\\n",
       "297263 -2.0 -2.0 -2.0 -2.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297264 -1.0 -1.0 -1.0 -1.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297265  0.0 -2.0 -2.0 -2.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297266 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "297267 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         39   40   41   42   43   44   45   46   47   48   49   50   51   52  \\\n",
       "297263 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297264 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297265 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297266 -1.0 -1.0 -1.0 -1.0 -1.0 -2.0 -2.0  0.0 -2.0 -2.0 -2.0 -2.0 -2.0 -3.0   \n",
       "297267 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         53   54   55   56   57   58   59   60   61   62   63   64   65   66  \\\n",
       "297263 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297264 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297265 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297266 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297267 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         67   68   69   70   71   72   73   74   75   76   77   78   79   80  \\\n",
       "297263 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297264 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297265 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297266 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297267 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         81   82   83   84   85   86   87   88   89   90   91   92   93   94  \\\n",
       "297263 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297264 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297265 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297266 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297267 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297268 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "297269 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "         95   96  SK_ID_CURR  TARGET  TRAIN  \n",
       "297263 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297264 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297265 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297266 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297267 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297268 -3.0 -3.0    100001.0     NaN    0.0  \n",
       "297269 -3.0 -3.0    100001.0     NaN    0.0  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bb_processed_df[bb_processed_df.SK_ID_CURR == 100001]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>768</th>\n",
       "      <td>380361</td>\n",
       "      <td>5715448</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-820</td>\n",
       "      <td>0</td>\n",
       "      <td>31069.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>67500.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-183</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "768      380361       5715448        Active      currency 1         -820   \n",
       "\n",
       "     CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "768                   0              31069.0                NaN   \n",
       "\n",
       "     AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "768                     NaN                   0         67500.0   \n",
       "\n",
       "     AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "768                  0.0               67500.0                     0.0   \n",
       "\n",
       "     CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "768  Credit card                -183          0.0  "
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_full_df[bureau_full_df.SK_ID_BUREAU == 5715448]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>MONTHS_BALANCE</th>\n",
       "      <th>STATUS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5715448</td>\n",
       "      <td>0</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-1</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-2</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-3</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-4</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU  MONTHS_BALANCE STATUS\n",
       "0       5715448               0      C\n",
       "1       5715448              -1      C\n",
       "2       5715448              -2      C\n",
       "3       5715448              -3      C\n",
       "4       5715448              -4      C"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_balance_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>13</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "      <th>30</th>\n",
       "      <th>31</th>\n",
       "      <th>32</th>\n",
       "      <th>33</th>\n",
       "      <th>34</th>\n",
       "      <th>35</th>\n",
       "      <th>36</th>\n",
       "      <th>37</th>\n",
       "      <th>38</th>\n",
       "      <th>39</th>\n",
       "      <th>40</th>\n",
       "      <th>41</th>\n",
       "      <th>42</th>\n",
       "      <th>43</th>\n",
       "      <th>44</th>\n",
       "      <th>45</th>\n",
       "      <th>46</th>\n",
       "      <th>47</th>\n",
       "      <th>48</th>\n",
       "      <th>49</th>\n",
       "      <th>50</th>\n",
       "      <th>51</th>\n",
       "      <th>52</th>\n",
       "      <th>53</th>\n",
       "      <th>54</th>\n",
       "      <th>55</th>\n",
       "      <th>56</th>\n",
       "      <th>57</th>\n",
       "      <th>58</th>\n",
       "      <th>59</th>\n",
       "      <th>60</th>\n",
       "      <th>61</th>\n",
       "      <th>62</th>\n",
       "      <th>63</th>\n",
       "      <th>64</th>\n",
       "      <th>65</th>\n",
       "      <th>66</th>\n",
       "      <th>67</th>\n",
       "      <th>68</th>\n",
       "      <th>69</th>\n",
       "      <th>70</th>\n",
       "      <th>71</th>\n",
       "      <th>72</th>\n",
       "      <th>73</th>\n",
       "      <th>74</th>\n",
       "      <th>75</th>\n",
       "      <th>76</th>\n",
       "      <th>77</th>\n",
       "      <th>78</th>\n",
       "      <th>79</th>\n",
       "      <th>80</th>\n",
       "      <th>81</th>\n",
       "      <th>82</th>\n",
       "      <th>83</th>\n",
       "      <th>84</th>\n",
       "      <th>85</th>\n",
       "      <th>86</th>\n",
       "      <th>87</th>\n",
       "      <th>88</th>\n",
       "      <th>89</th>\n",
       "      <th>90</th>\n",
       "      <th>91</th>\n",
       "      <th>92</th>\n",
       "      <th>93</th>\n",
       "      <th>94</th>\n",
       "      <th>95</th>\n",
       "      <th>96</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5715448</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5715449</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5715451</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5715452</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5715453</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU    0    1    2    3    4    5    6    7    8    9   10   11  \\\n",
       "0       5715448 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0  0.0 -2.0   \n",
       "1       5715449 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0  0.0  0.0  0.0  0.0 -2.0   \n",
       "2       5715451  NaN  NaN  NaN  NaN  NaN -1.0 -1.0 -1.0 -1.0 -1.0  0.0  0.0   \n",
       "3       5715452 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "4       5715453 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0   \n",
       "\n",
       "    12   13   14   15   16   17   18   19   20   21   22   23   24   25   26  \\\n",
       "0 -2.0 -2.0  0.0  0.0  0.0  0.0  0.0  0.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0   \n",
       "1  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN   \n",
       "2  0.0  0.0  0.0  0.0 -2.0 -2.0 -2.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "3 -1.0 -1.0 -1.0  0.0  0.0 -2.0 -2.0 -2.0  0.0  0.0  0.0  0.0  0.0  0.0 -2.0   \n",
       "4 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0  0.0  0.0 -2.0 -2.0 -2.0  0.0  0.0   \n",
       "\n",
       "    27   28   29   30   31   32   33   34   35   36   37  38  39  40  41  42  \\\n",
       "0  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN NaN NaN NaN NaN NaN   \n",
       "1  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN  NaN NaN NaN NaN NaN NaN   \n",
       "2  0.0  0.0  0.0 -2.0  NaN  NaN  NaN  NaN  NaN  NaN  NaN NaN NaN NaN NaN NaN   \n",
       "3 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0  NaN  NaN  NaN  NaN  NaN NaN NaN NaN NaN NaN   \n",
       "4  0.0  0.0  0.0  0.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 NaN NaN NaN NaN NaN   \n",
       "\n",
       "   43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  \\\n",
       "0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "\n",
       "   62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  \\\n",
       "0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   \n",
       "\n",
       "   81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  \n",
       "0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN  \n",
       "1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN  \n",
       "2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN  \n",
       "3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN  \n",
       "4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN  "
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv('dataset/bureau_balance_processed.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(817395, 102)"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(523515, 100)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>13</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "      <th>30</th>\n",
       "      <th>31</th>\n",
       "      <th>32</th>\n",
       "      <th>33</th>\n",
       "      <th>34</th>\n",
       "      <th>35</th>\n",
       "      <th>36</th>\n",
       "      <th>37</th>\n",
       "      <th>38</th>\n",
       "      <th>39</th>\n",
       "      <th>40</th>\n",
       "      <th>41</th>\n",
       "      <th>42</th>\n",
       "      <th>43</th>\n",
       "      <th>44</th>\n",
       "      <th>45</th>\n",
       "      <th>46</th>\n",
       "      <th>47</th>\n",
       "      <th>48</th>\n",
       "      <th>49</th>\n",
       "      <th>50</th>\n",
       "      <th>51</th>\n",
       "      <th>52</th>\n",
       "      <th>53</th>\n",
       "      <th>54</th>\n",
       "      <th>55</th>\n",
       "      <th>56</th>\n",
       "      <th>57</th>\n",
       "      <th>58</th>\n",
       "      <th>59</th>\n",
       "      <th>60</th>\n",
       "      <th>61</th>\n",
       "      <th>62</th>\n",
       "      <th>63</th>\n",
       "      <th>64</th>\n",
       "      <th>65</th>\n",
       "      <th>66</th>\n",
       "      <th>67</th>\n",
       "      <th>68</th>\n",
       "      <th>69</th>\n",
       "      <th>70</th>\n",
       "      <th>71</th>\n",
       "      <th>72</th>\n",
       "      <th>73</th>\n",
       "      <th>74</th>\n",
       "      <th>75</th>\n",
       "      <th>76</th>\n",
       "      <th>77</th>\n",
       "      <th>78</th>\n",
       "      <th>79</th>\n",
       "      <th>80</th>\n",
       "      <th>81</th>\n",
       "      <th>82</th>\n",
       "      <th>83</th>\n",
       "      <th>84</th>\n",
       "      <th>85</th>\n",
       "      <th>86</th>\n",
       "      <th>87</th>\n",
       "      <th>88</th>\n",
       "      <th>89</th>\n",
       "      <th>90</th>\n",
       "      <th>91</th>\n",
       "      <th>92</th>\n",
       "      <th>93</th>\n",
       "      <th>94</th>\n",
       "      <th>95</th>\n",
       "      <th>96</th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>TRAIN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5001709</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.011458</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5001710</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>0.178958</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5001711</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>0.020000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5001712</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>162368.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5001713</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>150635.0</td>\n",
       "      <td>0.391875</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   SK_ID_BUREAU    0    1    2    3    4    5    6    7    8    9   10   11  \\\n",
       "0       5001709  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "1       5001710  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "2       5001711  0.1  0.0  0.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3       5001712  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "4       5001713  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   \n",
       "\n",
       "    12   13   14   15   16   17   18   19   20   21   22   23   24   25   26  \\\n",
       "0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "1  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3  0.0  0.0  0.0  0.0  0.0  0.0  0.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    27   28   29   30   31   32   33   34   35   36   37   38   39   40   41  \\\n",
       "0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "1  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    42   43   44   45   46   47   48   49   50   51   52   53   54   55   56  \\\n",
       "0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "1  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.1  0.0  0.0  0.0  0.0  0.1  0.1  0.1   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    57   58   59   60   61   62   63   64   65   66   67   68   69   70   71  \\\n",
       "0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
       "1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    72   73   74   75   76   77   78   79   80   81   82   83   84   85   86  \\\n",
       "0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.1   \n",
       "1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1 -3.0 -3.0 -3.0 -3.0   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0   \n",
       "\n",
       "    87   88   89   90   91   92   93   94   95   96  SK_ID_CURR  RISK_SCORE  \\\n",
       "0  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1         NaN    0.011458   \n",
       "1 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0    0.178958   \n",
       "2 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0    0.020000   \n",
       "3 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    162368.0    0.000000   \n",
       "4 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0    150635.0    0.391875   \n",
       "\n",
       "   TARGET  TRAIN  \n",
       "0     NaN    0.0  \n",
       "1     NaN    0.0  \n",
       "2     NaN    0.0  \n",
       "3     NaN    0.0  \n",
       "4     NaN    0.0  "
      ]
     },
     "execution_count": 152,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>10</th>\n",
       "      <th>11</th>\n",
       "      <th>12</th>\n",
       "      <th>13</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "      <th>30</th>\n",
       "      <th>31</th>\n",
       "      <th>32</th>\n",
       "      <th>33</th>\n",
       "      <th>34</th>\n",
       "      <th>35</th>\n",
       "      <th>36</th>\n",
       "      <th>37</th>\n",
       "      <th>38</th>\n",
       "      <th>39</th>\n",
       "      <th>40</th>\n",
       "      <th>41</th>\n",
       "      <th>42</th>\n",
       "      <th>43</th>\n",
       "      <th>44</th>\n",
       "      <th>45</th>\n",
       "      <th>46</th>\n",
       "      <th>47</th>\n",
       "      <th>48</th>\n",
       "      <th>49</th>\n",
       "      <th>50</th>\n",
       "      <th>51</th>\n",
       "      <th>52</th>\n",
       "      <th>53</th>\n",
       "      <th>54</th>\n",
       "      <th>55</th>\n",
       "      <th>56</th>\n",
       "      <th>57</th>\n",
       "      <th>58</th>\n",
       "      <th>59</th>\n",
       "      <th>60</th>\n",
       "      <th>61</th>\n",
       "      <th>62</th>\n",
       "      <th>63</th>\n",
       "      <th>64</th>\n",
       "      <th>65</th>\n",
       "      <th>66</th>\n",
       "      <th>67</th>\n",
       "      <th>68</th>\n",
       "      <th>69</th>\n",
       "      <th>70</th>\n",
       "      <th>71</th>\n",
       "      <th>72</th>\n",
       "      <th>73</th>\n",
       "      <th>74</th>\n",
       "      <th>75</th>\n",
       "      <th>76</th>\n",
       "      <th>77</th>\n",
       "      <th>78</th>\n",
       "      <th>79</th>\n",
       "      <th>80</th>\n",
       "      <th>81</th>\n",
       "      <th>82</th>\n",
       "      <th>83</th>\n",
       "      <th>84</th>\n",
       "      <th>85</th>\n",
       "      <th>86</th>\n",
       "      <th>87</th>\n",
       "      <th>88</th>\n",
       "      <th>89</th>\n",
       "      <th>90</th>\n",
       "      <th>91</th>\n",
       "      <th>92</th>\n",
       "      <th>93</th>\n",
       "      <th>94</th>\n",
       "      <th>95</th>\n",
       "      <th>96</th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>RISK_SCORE</th>\n",
       "      <th>TARGET</th>\n",
       "      <th>TRAIN</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [SK_ID_BUREAU, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, SK_ID_CURR, RISK_SCORE, ...]\n",
       "Index: []"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df.RISK_SCORE == -3].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(523515, 100)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dropna(subset = ['SK_ID_CURR', 'TARGET']).shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SK_ID_CURR</th>\n",
       "      <th>SK_ID_BUREAU</th>\n",
       "      <th>CREDIT_ACTIVE</th>\n",
       "      <th>CREDIT_CURRENCY</th>\n",
       "      <th>DAYS_CREDIT</th>\n",
       "      <th>CREDIT_DAY_OVERDUE</th>\n",
       "      <th>DAYS_CREDIT_ENDDATE</th>\n",
       "      <th>DAYS_ENDDATE_FACT</th>\n",
       "      <th>AMT_CREDIT_MAX_OVERDUE</th>\n",
       "      <th>CNT_CREDIT_PROLONG</th>\n",
       "      <th>AMT_CREDIT_SUM</th>\n",
       "      <th>AMT_CREDIT_SUM_DEBT</th>\n",
       "      <th>AMT_CREDIT_SUM_LIMIT</th>\n",
       "      <th>AMT_CREDIT_SUM_OVERDUE</th>\n",
       "      <th>CREDIT_TYPE</th>\n",
       "      <th>DAYS_CREDIT_UPDATE</th>\n",
       "      <th>AMT_ANNUITY</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714462</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-497</td>\n",
       "      <td>0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>-153.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>91323.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-131</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714463</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-208</td>\n",
       "      <td>0</td>\n",
       "      <td>1075.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.000</td>\n",
       "      <td>171342.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-20</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714464</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-203</td>\n",
       "      <td>0</td>\n",
       "      <td>528.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>464323.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-16</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714465</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-203</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>90000.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-16</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714466</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-629</td>\n",
       "      <td>0</td>\n",
       "      <td>1197.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77674.500</td>\n",
       "      <td>0</td>\n",
       "      <td>2700000.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-21</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714467</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-273</td>\n",
       "      <td>0</td>\n",
       "      <td>27460.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>180000.000</td>\n",
       "      <td>71017.380</td>\n",
       "      <td>108982.620</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-31</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>215354</td>\n",
       "      <td>5714468</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-43</td>\n",
       "      <td>0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>42103.800</td>\n",
       "      <td>42103.800</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-22</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714469</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1896</td>\n",
       "      <td>0</td>\n",
       "      <td>-1684.0</td>\n",
       "      <td>-1710.0</td>\n",
       "      <td>14985.000</td>\n",
       "      <td>0</td>\n",
       "      <td>76878.450</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1710</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714470</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1146</td>\n",
       "      <td>0</td>\n",
       "      <td>-811.0</td>\n",
       "      <td>-840.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>103007.700</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-840</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714471</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1146</td>\n",
       "      <td>0</td>\n",
       "      <td>-484.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>4500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-690</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714472</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1146</td>\n",
       "      <td>0</td>\n",
       "      <td>-180.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>337500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-690</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714473</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2456</td>\n",
       "      <td>0</td>\n",
       "      <td>-629.0</td>\n",
       "      <td>-825.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>675000.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-706</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>162297</td>\n",
       "      <td>5714474</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-277</td>\n",
       "      <td>0</td>\n",
       "      <td>5261.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>7033500.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Mortgage</td>\n",
       "      <td>-31</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>402440</td>\n",
       "      <td>5714475</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-96</td>\n",
       "      <td>0</td>\n",
       "      <td>269.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>89910.000</td>\n",
       "      <td>76905.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-22</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714482</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-318</td>\n",
       "      <td>0</td>\n",
       "      <td>-187.0</td>\n",
       "      <td>-187.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-185</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714484</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2911</td>\n",
       "      <td>0</td>\n",
       "      <td>-2607.0</td>\n",
       "      <td>-2604.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>48555.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2601</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714485</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2148</td>\n",
       "      <td>0</td>\n",
       "      <td>-1595.0</td>\n",
       "      <td>-987.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>135000.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-984</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714486</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-381</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>520920.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-4</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714487</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-95</td>\n",
       "      <td>0</td>\n",
       "      <td>1720.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>8131.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714488</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-444</td>\n",
       "      <td>0</td>\n",
       "      <td>-77.0</td>\n",
       "      <td>-77.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>107184.060</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-71</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>238881</td>\n",
       "      <td>5714489</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-392</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>252000.000</td>\n",
       "      <td>23679.000</td>\n",
       "      <td>228320.100</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-22</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714491</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-784</td>\n",
       "      <td>0</td>\n",
       "      <td>1008.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>-411.615</td>\n",
       "      <td>411.615</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-694</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714492</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-774</td>\n",
       "      <td>0</td>\n",
       "      <td>625.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>127840.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-210</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714493</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-395</td>\n",
       "      <td>0</td>\n",
       "      <td>1431.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>1350000.000</td>\n",
       "      <td>1185493.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-24</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714495</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2744</td>\n",
       "      <td>0</td>\n",
       "      <td>-2561.0</td>\n",
       "      <td>-2559.0</td>\n",
       "      <td>310.500</td>\n",
       "      <td>0</td>\n",
       "      <td>18157.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2559</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714496</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1103</td>\n",
       "      <td>0</td>\n",
       "      <td>-7.0</td>\n",
       "      <td>-343.0</td>\n",
       "      <td>20493.270</td>\n",
       "      <td>0</td>\n",
       "      <td>675000.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-343</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>222183</td>\n",
       "      <td>5714497</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-315</td>\n",
       "      <td>0</td>\n",
       "      <td>1512.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>88821.000</td>\n",
       "      <td>0</td>\n",
       "      <td>3709552.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Car loan</td>\n",
       "      <td>-32</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>426155</td>\n",
       "      <td>5714498</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1331</td>\n",
       "      <td>0</td>\n",
       "      <td>-994.0</td>\n",
       "      <td>-1023.0</td>\n",
       "      <td>1350.000</td>\n",
       "      <td>0</td>\n",
       "      <td>39433.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1023</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>426155</td>\n",
       "      <td>5714499</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2534</td>\n",
       "      <td>0</td>\n",
       "      <td>-2352.0</td>\n",
       "      <td>-2347.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>38830.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2345</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>426155</td>\n",
       "      <td>5714500</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-845</td>\n",
       "      <td>0</td>\n",
       "      <td>-480.0</td>\n",
       "      <td>-480.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-480</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716398</th>\n",
       "      <td>312021</td>\n",
       "      <td>5057541</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1529</td>\n",
       "      <td>0</td>\n",
       "      <td>-829.0</td>\n",
       "      <td>-829.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>209898.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-824</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716399</th>\n",
       "      <td>232638</td>\n",
       "      <td>5057553</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-613</td>\n",
       "      <td>0</td>\n",
       "      <td>721.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>972000.000</td>\n",
       "      <td>886297.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-42</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716400</th>\n",
       "      <td>318662</td>\n",
       "      <td>5057561</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-815</td>\n",
       "      <td>0</td>\n",
       "      <td>1011.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>147150.000</td>\n",
       "      <td>105358.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-70</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716401</th>\n",
       "      <td>145715</td>\n",
       "      <td>5057569</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2333</td>\n",
       "      <td>0</td>\n",
       "      <td>-2027.0</td>\n",
       "      <td>-1984.0</td>\n",
       "      <td>173.070</td>\n",
       "      <td>0</td>\n",
       "      <td>35032.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1984</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716402</th>\n",
       "      <td>352358</td>\n",
       "      <td>5057580</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1714</td>\n",
       "      <td>0</td>\n",
       "      <td>-1530.0</td>\n",
       "      <td>-1564.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>35271.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1532</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716403</th>\n",
       "      <td>361928</td>\n",
       "      <td>5057589</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-765</td>\n",
       "      <td>0</td>\n",
       "      <td>1061.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>1431000.000</td>\n",
       "      <td>1092226.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-126</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716404</th>\n",
       "      <td>166279</td>\n",
       "      <td>5057599</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-99</td>\n",
       "      <td>0</td>\n",
       "      <td>997.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>450000.000</td>\n",
       "      <td>432787.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-7</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716405</th>\n",
       "      <td>438109</td>\n",
       "      <td>5057605</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2390</td>\n",
       "      <td>0</td>\n",
       "      <td>-2053.0</td>\n",
       "      <td>-2082.0</td>\n",
       "      <td>11317.590</td>\n",
       "      <td>0</td>\n",
       "      <td>112204.350</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2082</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716406</th>\n",
       "      <td>335468</td>\n",
       "      <td>5057618</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2517</td>\n",
       "      <td>0</td>\n",
       "      <td>-660.0</td>\n",
       "      <td>-2363.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>473940.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Car loan</td>\n",
       "      <td>-2363</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716407</th>\n",
       "      <td>146896</td>\n",
       "      <td>5057629</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1990</td>\n",
       "      <td>0</td>\n",
       "      <td>-1244.0</td>\n",
       "      <td>-1248.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>90000.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1248</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716408</th>\n",
       "      <td>146896</td>\n",
       "      <td>5057632</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-434</td>\n",
       "      <td>0</td>\n",
       "      <td>-344.0</td>\n",
       "      <td>-344.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>234000.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-336</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716409</th>\n",
       "      <td>146896</td>\n",
       "      <td>5057636</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1705</td>\n",
       "      <td>0</td>\n",
       "      <td>-582.0</td>\n",
       "      <td>-582.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-582</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716410</th>\n",
       "      <td>280228</td>\n",
       "      <td>5057642</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-575</td>\n",
       "      <td>0</td>\n",
       "      <td>813.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-46</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716411</th>\n",
       "      <td>232118</td>\n",
       "      <td>5057652</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-821</td>\n",
       "      <td>0</td>\n",
       "      <td>-425.0</td>\n",
       "      <td>-545.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>108765.720</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-545</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716412</th>\n",
       "      <td>288038</td>\n",
       "      <td>5057657</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-541</td>\n",
       "      <td>0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>225000.000</td>\n",
       "      <td>10971.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-11</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716413</th>\n",
       "      <td>288038</td>\n",
       "      <td>5057665</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-463</td>\n",
       "      <td>0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>-36.0</td>\n",
       "      <td>6863.715</td>\n",
       "      <td>0</td>\n",
       "      <td>110878.470</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-33</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716414</th>\n",
       "      <td>445222</td>\n",
       "      <td>5057676</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1628</td>\n",
       "      <td>0</td>\n",
       "      <td>-1320.0</td>\n",
       "      <td>-1320.0</td>\n",
       "      <td>5693.625</td>\n",
       "      <td>0</td>\n",
       "      <td>57834.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1320</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716415</th>\n",
       "      <td>317217</td>\n",
       "      <td>5057684</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1970</td>\n",
       "      <td>0</td>\n",
       "      <td>-1577.0</td>\n",
       "      <td>-1577.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>93955.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1577</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716416</th>\n",
       "      <td>433007</td>\n",
       "      <td>5057695</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1100</td>\n",
       "      <td>0</td>\n",
       "      <td>-732.0</td>\n",
       "      <td>-731.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>98775.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-720</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716417</th>\n",
       "      <td>433007</td>\n",
       "      <td>5057703</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-740</td>\n",
       "      <td>0</td>\n",
       "      <td>31128.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>67500.000</td>\n",
       "      <td>2466.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-433</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716418</th>\n",
       "      <td>433007</td>\n",
       "      <td>5057708</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1389</td>\n",
       "      <td>0</td>\n",
       "      <td>-1299.0</td>\n",
       "      <td>-1299.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>334158.435</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1299</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716419</th>\n",
       "      <td>352790</td>\n",
       "      <td>5057718</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1808</td>\n",
       "      <td>0</td>\n",
       "      <td>-1596.0</td>\n",
       "      <td>-1625.0</td>\n",
       "      <td>8100.000</td>\n",
       "      <td>0</td>\n",
       "      <td>28248.840</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1625</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716420</th>\n",
       "      <td>352790</td>\n",
       "      <td>5057725</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-99</td>\n",
       "      <td>0</td>\n",
       "      <td>-83.0</td>\n",
       "      <td>-98.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>27000.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-18</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716421</th>\n",
       "      <td>375755</td>\n",
       "      <td>5057734</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1335</td>\n",
       "      <td>0</td>\n",
       "      <td>-1152.0</td>\n",
       "      <td>-1152.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>195408.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1139</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716422</th>\n",
       "      <td>375755</td>\n",
       "      <td>5057742</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2648</td>\n",
       "      <td>0</td>\n",
       "      <td>31129.0</td>\n",
       "      <td>-189.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>202500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Credit card</td>\n",
       "      <td>-109</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716423</th>\n",
       "      <td>259355</td>\n",
       "      <td>5057750</td>\n",
       "      <td>Active</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-44</td>\n",
       "      <td>0</td>\n",
       "      <td>-30.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>11250.000</td>\n",
       "      <td>11250.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Microloan</td>\n",
       "      <td>-19</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716424</th>\n",
       "      <td>100044</td>\n",
       "      <td>5057754</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-2648</td>\n",
       "      <td>0</td>\n",
       "      <td>-2433.0</td>\n",
       "      <td>-2493.0</td>\n",
       "      <td>5476.500</td>\n",
       "      <td>0</td>\n",
       "      <td>38130.840</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-2493</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716425</th>\n",
       "      <td>100044</td>\n",
       "      <td>5057762</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1809</td>\n",
       "      <td>0</td>\n",
       "      <td>-1628.0</td>\n",
       "      <td>-970.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>15570.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-967</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716426</th>\n",
       "      <td>246829</td>\n",
       "      <td>5057770</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-1878</td>\n",
       "      <td>0</td>\n",
       "      <td>-1513.0</td>\n",
       "      <td>-1513.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>36000.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Consumer credit</td>\n",
       "      <td>-1508</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1716427</th>\n",
       "      <td>246829</td>\n",
       "      <td>5057778</td>\n",
       "      <td>Closed</td>\n",
       "      <td>currency 1</td>\n",
       "      <td>-463</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-387.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>22500.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Microloan</td>\n",
       "      <td>-387</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1716428 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         SK_ID_CURR  SK_ID_BUREAU CREDIT_ACTIVE CREDIT_CURRENCY  DAYS_CREDIT  \\\n",
       "0            215354       5714462        Closed      currency 1         -497   \n",
       "1            215354       5714463        Active      currency 1         -208   \n",
       "2            215354       5714464        Active      currency 1         -203   \n",
       "3            215354       5714465        Active      currency 1         -203   \n",
       "4            215354       5714466        Active      currency 1         -629   \n",
       "5            215354       5714467        Active      currency 1         -273   \n",
       "6            215354       5714468        Active      currency 1          -43   \n",
       "7            162297       5714469        Closed      currency 1        -1896   \n",
       "8            162297       5714470        Closed      currency 1        -1146   \n",
       "9            162297       5714471        Active      currency 1        -1146   \n",
       "10           162297       5714472        Active      currency 1        -1146   \n",
       "11           162297       5714473        Closed      currency 1        -2456   \n",
       "12           162297       5714474        Active      currency 1         -277   \n",
       "13           402440       5714475        Active      currency 1          -96   \n",
       "14           238881       5714482        Closed      currency 1         -318   \n",
       "15           238881       5714484        Closed      currency 1        -2911   \n",
       "16           238881       5714485        Closed      currency 1        -2148   \n",
       "17           238881       5714486        Active      currency 1         -381   \n",
       "18           238881       5714487        Active      currency 1          -95   \n",
       "19           238881       5714488        Closed      currency 1         -444   \n",
       "20           238881       5714489        Active      currency 1         -392   \n",
       "21           222183       5714491        Active      currency 1         -784   \n",
       "22           222183       5714492        Active      currency 1         -774   \n",
       "23           222183       5714493        Active      currency 1         -395   \n",
       "24           222183       5714495        Closed      currency 1        -2744   \n",
       "25           222183       5714496        Closed      currency 1        -1103   \n",
       "26           222183       5714497        Active      currency 1         -315   \n",
       "27           426155       5714498        Closed      currency 1        -1331   \n",
       "28           426155       5714499        Closed      currency 1        -2534   \n",
       "29           426155       5714500        Closed      currency 1         -845   \n",
       "...             ...           ...           ...             ...          ...   \n",
       "1716398      312021       5057541        Closed      currency 1        -1529   \n",
       "1716399      232638       5057553        Active      currency 1         -613   \n",
       "1716400      318662       5057561        Active      currency 1         -815   \n",
       "1716401      145715       5057569        Closed      currency 1        -2333   \n",
       "1716402      352358       5057580        Closed      currency 1        -1714   \n",
       "1716403      361928       5057589        Active      currency 1         -765   \n",
       "1716404      166279       5057599        Active      currency 1          -99   \n",
       "1716405      438109       5057605        Closed      currency 1        -2390   \n",
       "1716406      335468       5057618        Closed      currency 1        -2517   \n",
       "1716407      146896       5057629        Closed      currency 1        -1990   \n",
       "1716408      146896       5057632        Closed      currency 1         -434   \n",
       "1716409      146896       5057636        Closed      currency 1        -1705   \n",
       "1716410      280228       5057642        Active      currency 1         -575   \n",
       "1716411      232118       5057652        Closed      currency 1         -821   \n",
       "1716412      288038       5057657        Active      currency 1         -541   \n",
       "1716413      288038       5057665        Closed      currency 1         -463   \n",
       "1716414      445222       5057676        Closed      currency 1        -1628   \n",
       "1716415      317217       5057684        Closed      currency 1        -1970   \n",
       "1716416      433007       5057695        Closed      currency 1        -1100   \n",
       "1716417      433007       5057703        Active      currency 1         -740   \n",
       "1716418      433007       5057708        Closed      currency 1        -1389   \n",
       "1716419      352790       5057718        Closed      currency 1        -1808   \n",
       "1716420      352790       5057725        Closed      currency 1          -99   \n",
       "1716421      375755       5057734        Closed      currency 1        -1335   \n",
       "1716422      375755       5057742        Closed      currency 1        -2648   \n",
       "1716423      259355       5057750        Active      currency 1          -44   \n",
       "1716424      100044       5057754        Closed      currency 1        -2648   \n",
       "1716425      100044       5057762        Closed      currency 1        -1809   \n",
       "1716426      246829       5057770        Closed      currency 1        -1878   \n",
       "1716427      246829       5057778        Closed      currency 1         -463   \n",
       "\n",
       "         CREDIT_DAY_OVERDUE  DAYS_CREDIT_ENDDATE  DAYS_ENDDATE_FACT  \\\n",
       "0                         0               -153.0             -153.0   \n",
       "1                         0               1075.0                NaN   \n",
       "2                         0                528.0                NaN   \n",
       "3                         0                  NaN                NaN   \n",
       "4                         0               1197.0                NaN   \n",
       "5                         0              27460.0                NaN   \n",
       "6                         0                 79.0                NaN   \n",
       "7                         0              -1684.0            -1710.0   \n",
       "8                         0               -811.0             -840.0   \n",
       "9                         0               -484.0                NaN   \n",
       "10                        0               -180.0                NaN   \n",
       "11                        0               -629.0             -825.0   \n",
       "12                        0               5261.0                NaN   \n",
       "13                        0                269.0                NaN   \n",
       "14                        0               -187.0             -187.0   \n",
       "15                        0              -2607.0            -2604.0   \n",
       "16                        0              -1595.0             -987.0   \n",
       "17                        0                  NaN                NaN   \n",
       "18                        0               1720.0                NaN   \n",
       "19                        0                -77.0              -77.0   \n",
       "20                        0                  NaN                NaN   \n",
       "21                        0               1008.0                NaN   \n",
       "22                        0                625.0                NaN   \n",
       "23                        0               1431.0                NaN   \n",
       "24                        0              -2561.0            -2559.0   \n",
       "25                        0                 -7.0             -343.0   \n",
       "26                        0               1512.0                NaN   \n",
       "27                        0               -994.0            -1023.0   \n",
       "28                        0              -2352.0            -2347.0   \n",
       "29                        0               -480.0             -480.0   \n",
       "...                     ...                  ...                ...   \n",
       "1716398                   0               -829.0             -829.0   \n",
       "1716399                   0                721.0                NaN   \n",
       "1716400                   0               1011.0                NaN   \n",
       "1716401                   0              -2027.0            -1984.0   \n",
       "1716402                   0              -1530.0            -1564.0   \n",
       "1716403                   0               1061.0                NaN   \n",
       "1716404                   0                997.0                NaN   \n",
       "1716405                   0              -2053.0            -2082.0   \n",
       "1716406                   0               -660.0            -2363.0   \n",
       "1716407                   0              -1244.0            -1248.0   \n",
       "1716408                   0               -344.0             -344.0   \n",
       "1716409                   0               -582.0             -582.0   \n",
       "1716410                   0                813.0                NaN   \n",
       "1716411                   0               -425.0             -545.0   \n",
       "1716412                   0                  7.0                NaN   \n",
       "1716413                   0                -36.0              -36.0   \n",
       "1716414                   0              -1320.0            -1320.0   \n",
       "1716415                   0              -1577.0            -1577.0   \n",
       "1716416                   0               -732.0             -731.0   \n",
       "1716417                   0              31128.0                NaN   \n",
       "1716418                   0              -1299.0            -1299.0   \n",
       "1716419                   0              -1596.0            -1625.0   \n",
       "1716420                   0                -83.0              -98.0   \n",
       "1716421                   0              -1152.0            -1152.0   \n",
       "1716422                   0              31129.0             -189.0   \n",
       "1716423                   0                -30.0                NaN   \n",
       "1716424                   0              -2433.0            -2493.0   \n",
       "1716425                   0              -1628.0             -970.0   \n",
       "1716426                   0              -1513.0            -1513.0   \n",
       "1716427                   0                  NaN             -387.0   \n",
       "\n",
       "         AMT_CREDIT_MAX_OVERDUE  CNT_CREDIT_PROLONG  AMT_CREDIT_SUM  \\\n",
       "0                           NaN                   0       91323.000   \n",
       "1                           NaN                   0      225000.000   \n",
       "2                           NaN                   0      464323.500   \n",
       "3                           NaN                   0       90000.000   \n",
       "4                     77674.500                   0     2700000.000   \n",
       "5                         0.000                   0      180000.000   \n",
       "6                         0.000                   0       42103.800   \n",
       "7                     14985.000                   0       76878.450   \n",
       "8                         0.000                   0      103007.700   \n",
       "9                         0.000                   0        4500.000   \n",
       "10                        0.000                   0      337500.000   \n",
       "11                          NaN                   0      675000.000   \n",
       "12                        0.000                   0     7033500.000   \n",
       "13                        0.000                   0       89910.000   \n",
       "14                          NaN                   0           0.000   \n",
       "15                          NaN                   0       48555.000   \n",
       "16                          NaN                   0      135000.000   \n",
       "17                          NaN                   0      450000.000   \n",
       "18                          NaN                   0       67500.000   \n",
       "19                        0.000                   0      107184.060   \n",
       "20                        0.000                   0      252000.000   \n",
       "21                        0.000                   0           0.000   \n",
       "22                          NaN                   0      127840.500   \n",
       "23                          NaN                   0     1350000.000   \n",
       "24                      310.500                   0       18157.500   \n",
       "25                    20493.270                   0      675000.000   \n",
       "26                    88821.000                   0     3709552.500   \n",
       "27                     1350.000                   0       39433.500   \n",
       "28                          NaN                   0       38830.500   \n",
       "29                        0.000                   0       67500.000   \n",
       "...                         ...                 ...             ...   \n",
       "1716398                     NaN                   0      209898.000   \n",
       "1716399                     NaN                   0      972000.000   \n",
       "1716400                     NaN                   0      147150.000   \n",
       "1716401                 173.070                   0       35032.500   \n",
       "1716402                     NaN                   0       35271.000   \n",
       "1716403                     NaN                   0     1431000.000   \n",
       "1716404                   0.000                   0      450000.000   \n",
       "1716405               11317.590                   0      112204.350   \n",
       "1716406                   0.000                   0      473940.000   \n",
       "1716407                     NaN                   0       90000.000   \n",
       "1716408                     NaN                   0      234000.000   \n",
       "1716409                   0.000                   0           0.000   \n",
       "1716410                     NaN                   0       67500.000   \n",
       "1716411                   0.000                   0      108765.720   \n",
       "1716412                     NaN                   0      225000.000   \n",
       "1716413                6863.715                   0      110878.470   \n",
       "1716414                5693.625                   0       57834.000   \n",
       "1716415                     NaN                   0       93955.500   \n",
       "1716416                     NaN                   0       98775.000   \n",
       "1716417                     NaN                   0       67500.000   \n",
       "1716418                   0.000                   0      334158.435   \n",
       "1716419                8100.000                   0       28248.840   \n",
       "1716420                     NaN                   0       27000.000   \n",
       "1716421                     NaN                   0      195408.000   \n",
       "1716422                     NaN                   0      202500.000   \n",
       "1716423                   0.000                   0       11250.000   \n",
       "1716424                5476.500                   0       38130.840   \n",
       "1716425                     NaN                   0       15570.000   \n",
       "1716426                     NaN                   0       36000.000   \n",
       "1716427                     NaN                   0       22500.000   \n",
       "\n",
       "         AMT_CREDIT_SUM_DEBT  AMT_CREDIT_SUM_LIMIT  AMT_CREDIT_SUM_OVERDUE  \\\n",
       "0                      0.000                   NaN                     0.0   \n",
       "1                 171342.000                   NaN                     0.0   \n",
       "2                        NaN                   NaN                     0.0   \n",
       "3                        NaN                   NaN                     0.0   \n",
       "4                        NaN                   NaN                     0.0   \n",
       "5                  71017.380            108982.620                     0.0   \n",
       "6                  42103.800                 0.000                     0.0   \n",
       "7                      0.000                 0.000                     0.0   \n",
       "8                      0.000                 0.000                     0.0   \n",
       "9                      0.000                 0.000                     0.0   \n",
       "10                     0.000                 0.000                     0.0   \n",
       "11                     0.000                 0.000                     0.0   \n",
       "12                       NaN                   NaN                     0.0   \n",
       "13                 76905.000                 0.000                     0.0   \n",
       "14                     0.000                 0.000                     0.0   \n",
       "15                       NaN                   NaN                     0.0   \n",
       "16                       NaN                   NaN                     0.0   \n",
       "17                520920.000                   NaN                     0.0   \n",
       "18                  8131.500                   NaN                     0.0   \n",
       "19                     0.000                 0.000                     0.0   \n",
       "20                 23679.000            228320.100                     0.0   \n",
       "21                  -411.615               411.615                     0.0   \n",
       "22                     0.000                 0.000                     0.0   \n",
       "23               1185493.500                 0.000                     0.0   \n",
       "24                       NaN                   NaN                     0.0   \n",
       "25                     0.000                 0.000                     0.0   \n",
       "26                       NaN                   NaN                     0.0   \n",
       "27                     0.000                 0.000                     0.0   \n",
       "28                     0.000                 0.000                     0.0   \n",
       "29                     0.000                 0.000                     0.0   \n",
       "...                      ...                   ...                     ...   \n",
       "1716398                0.000                   NaN                     0.0   \n",
       "1716399           886297.500                 0.000                     0.0   \n",
       "1716400           105358.500                 0.000                     0.0   \n",
       "1716401                0.000                 0.000                     0.0   \n",
       "1716402                0.000                 0.000                     0.0   \n",
       "1716403          1092226.500                 0.000                     0.0   \n",
       "1716404           432787.500                 0.000                     0.0   \n",
       "1716405                0.000                 0.000                     0.0   \n",
       "1716406                0.000                 0.000                     0.0   \n",
       "1716407                  NaN                   NaN                     0.0   \n",
       "1716408                0.000                   NaN                     0.0   \n",
       "1716409                0.000                 0.000                     0.0   \n",
       "1716410                0.000                 0.000                     0.0   \n",
       "1716411                0.000                 0.000                     0.0   \n",
       "1716412            10971.000                 0.000                     0.0   \n",
       "1716413                0.000                 0.000                     0.0   \n",
       "1716414                0.000                 0.000                     0.0   \n",
       "1716415                  NaN                   NaN                     0.0   \n",
       "1716416                0.000                 0.000                     0.0   \n",
       "1716417             2466.000                   NaN                     0.0   \n",
       "1716418                0.000                 0.000                     0.0   \n",
       "1716419                0.000                 0.000                     0.0   \n",
       "1716420                0.000                 0.000                     0.0   \n",
       "1716421                0.000                   NaN                     0.0   \n",
       "1716422                0.000                   NaN                     0.0   \n",
       "1716423            11250.000                 0.000                     0.0   \n",
       "1716424                0.000                 0.000                     0.0   \n",
       "1716425                  NaN                   NaN                     0.0   \n",
       "1716426                0.000                 0.000                     0.0   \n",
       "1716427                0.000                   NaN                     0.0   \n",
       "\n",
       "             CREDIT_TYPE  DAYS_CREDIT_UPDATE  AMT_ANNUITY  \n",
       "0        Consumer credit                -131          NaN  \n",
       "1            Credit card                 -20          NaN  \n",
       "2        Consumer credit                 -16          NaN  \n",
       "3            Credit card                 -16          NaN  \n",
       "4        Consumer credit                 -21          NaN  \n",
       "5            Credit card                 -31          NaN  \n",
       "6        Consumer credit                 -22          NaN  \n",
       "7        Consumer credit               -1710          NaN  \n",
       "8        Consumer credit                -840          NaN  \n",
       "9            Credit card                -690          NaN  \n",
       "10           Credit card                -690          NaN  \n",
       "11       Consumer credit                -706          NaN  \n",
       "12              Mortgage                 -31          NaN  \n",
       "13       Consumer credit                 -22          NaN  \n",
       "14           Credit card                -185          NaN  \n",
       "15       Consumer credit               -2601          NaN  \n",
       "16       Consumer credit                -984          NaN  \n",
       "17       Consumer credit                  -4          NaN  \n",
       "18           Credit card                  -7          NaN  \n",
       "19       Consumer credit                 -71          NaN  \n",
       "20           Credit card                 -22          NaN  \n",
       "21           Credit card                -694          NaN  \n",
       "22           Credit card                -210          NaN  \n",
       "23       Consumer credit                 -24          NaN  \n",
       "24       Consumer credit               -2559          NaN  \n",
       "25       Consumer credit                -343          NaN  \n",
       "26              Car loan                 -32          NaN  \n",
       "27       Consumer credit               -1023          NaN  \n",
       "28       Consumer credit               -2345          NaN  \n",
       "29       Consumer credit                -480          NaN  \n",
       "...                  ...                 ...          ...  \n",
       "1716398  Consumer credit                -824          NaN  \n",
       "1716399      Credit card                 -42          NaN  \n",
       "1716400  Consumer credit                 -70          NaN  \n",
       "1716401  Consumer credit               -1984          NaN  \n",
       "1716402  Consumer credit               -1532          NaN  \n",
       "1716403  Consumer credit                -126          NaN  \n",
       "1716404  Consumer credit                  -7          NaN  \n",
       "1716405  Consumer credit               -2082          NaN  \n",
       "1716406         Car loan               -2363          NaN  \n",
       "1716407  Consumer credit               -1248          NaN  \n",
       "1716408      Credit card                -336          NaN  \n",
       "1716409      Credit card                -582          NaN  \n",
       "1716410      Credit card                 -46          NaN  \n",
       "1716411  Consumer credit                -545          NaN  \n",
       "1716412  Consumer credit                 -11          NaN  \n",
       "1716413  Consumer credit                 -33          NaN  \n",
       "1716414  Consumer credit               -1320          NaN  \n",
       "1716415  Consumer credit               -1577          NaN  \n",
       "1716416  Consumer credit                -720          NaN  \n",
       "1716417      Credit card                -433          NaN  \n",
       "1716418  Consumer credit               -1299          NaN  \n",
       "1716419  Consumer credit               -1625          NaN  \n",
       "1716420  Consumer credit                 -18          NaN  \n",
       "1716421  Consumer credit               -1139          NaN  \n",
       "1716422      Credit card                -109          NaN  \n",
       "1716423        Microloan                 -19          NaN  \n",
       "1716424  Consumer credit               -2493          NaN  \n",
       "1716425  Consumer credit                -967          NaN  \n",
       "1716426  Consumer credit               -1508          NaN  \n",
       "1716427        Microloan                -387          NaN  \n",
       "\n",
       "[1716428 rows x 17 columns]"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bureau_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
